@storm-software/workspace-tools 1.27.0 → 1.29.0
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/CHANGELOG.md +14 -0
- package/executors.json +5 -0
- package/generators.json +5 -0
- package/index.js +165 -118
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +94 -59
- package/src/executors/tsup/get-config.js +18427 -627
- package/src/executors/tsup/schema.json +1 -1
- package/src/executors/tsup-browser/executor.js +117986 -0
- package/src/executors/tsup-browser/schema.d.ts +9 -0
- package/src/executors/tsup-browser/schema.json +11 -0
- package/src/executors/tsup-neutral/executor.js +94 -59
- package/src/executors/tsup-node/executor.js +94 -59
- package/src/generators/browser-library/files/README.md +58 -0
- package/src/generators/browser-library/files/jest.config.ts +3 -0
- package/src/generators/browser-library/files/src/index.ts.template +10 -0
- package/src/generators/browser-library/files/tsconfig.spec.json +13 -0
- package/src/generators/browser-library/generator.js +48471 -0
- package/src/generators/browser-library/schema.d.ts +22 -0
- package/src/generators/browser-library/schema.json +82 -0
- package/src/generators/neutral-library/generator.js +48445 -0
- package/src/generators/node-library/generator.js +17 -5
package/package.json
CHANGED
|
@@ -4438,12 +4438,12 @@ var require_install_packages_task = __commonJS({
|
|
|
4438
4438
|
var child_process_1 = require("child_process");
|
|
4439
4439
|
var path_1 = require("path");
|
|
4440
4440
|
var nx_1 = require_nx();
|
|
4441
|
-
var { detectPackageManager, getPackageManagerCommand, joinPathFragments:
|
|
4441
|
+
var { detectPackageManager, getPackageManagerCommand, joinPathFragments: joinPathFragments3 } = (0, nx_1.requireNx)();
|
|
4442
4442
|
function installPackagesTask(tree, alwaysRun = false, cwd = "", packageManager = detectPackageManager(cwd)) {
|
|
4443
|
-
if (!tree.listChanges().find((f) => f.path ===
|
|
4443
|
+
if (!tree.listChanges().find((f) => f.path === joinPathFragments3(cwd, "package.json")) && !alwaysRun) {
|
|
4444
4444
|
return;
|
|
4445
4445
|
}
|
|
4446
|
-
const packageJsonValue = tree.read(
|
|
4446
|
+
const packageJsonValue = tree.read(joinPathFragments3(cwd, "package.json"), "utf-8");
|
|
4447
4447
|
let storedPackageJsonValue = global["__packageJsonInstallCache__"];
|
|
4448
4448
|
if (storedPackageJsonValue != packageJsonValue || alwaysRun) {
|
|
4449
4449
|
global["__packageJsonInstallCache__"] = packageJsonValue;
|
|
@@ -35010,7 +35010,7 @@ var require_project_name_and_root_utils = __commonJS({
|
|
|
35010
35010
|
var nx_1 = require_nx();
|
|
35011
35011
|
var get_workspace_layout_1 = require_get_workspace_layout();
|
|
35012
35012
|
var names_1 = require_names();
|
|
35013
|
-
var { joinPathFragments:
|
|
35013
|
+
var { joinPathFragments: joinPathFragments3, normalizePath, logger, readJson, stripIndents, workspaceRoot } = (0, nx_1.requireNx)();
|
|
35014
35014
|
var deprecationWarning = stripIndents`
|
|
35015
35015
|
In Nx 18, generating projects will no longer derive the name and root.
|
|
35016
35016
|
Please provide the exact project name and root in the future.`;
|
|
@@ -35086,14 +35086,14 @@ var require_project_name_and_root_utils = __commonJS({
|
|
|
35086
35086
|
if (directory === relativeCwd || directory.startsWith(`${relativeCwd}/`)) {
|
|
35087
35087
|
asProvidedProjectDirectory = directory;
|
|
35088
35088
|
} else {
|
|
35089
|
-
asProvidedProjectDirectory =
|
|
35089
|
+
asProvidedProjectDirectory = joinPathFragments3(relativeCwd, directory);
|
|
35090
35090
|
}
|
|
35091
35091
|
} else if (options.rootProject) {
|
|
35092
35092
|
asProvidedProjectDirectory = ".";
|
|
35093
35093
|
} else {
|
|
35094
35094
|
asProvidedProjectDirectory = relativeCwd;
|
|
35095
35095
|
if (!relativeCwd.endsWith(asProvidedProjectName) && !relativeCwd.endsWith(options.name)) {
|
|
35096
|
-
asProvidedProjectDirectory =
|
|
35096
|
+
asProvidedProjectDirectory = joinPathFragments3(relativeCwd, asProvidedProjectName);
|
|
35097
35097
|
}
|
|
35098
35098
|
}
|
|
35099
35099
|
if (asProvidedProjectName.startsWith("@")) {
|
|
@@ -35126,7 +35126,7 @@ var require_project_name_and_root_utils = __commonJS({
|
|
|
35126
35126
|
const derivedSimpleProjectName = name;
|
|
35127
35127
|
let derivedProjectDirectory = derivedProjectDirectoryWithoutLayout;
|
|
35128
35128
|
if (derivedProjectDirectoryWithoutLayout !== ".") {
|
|
35129
|
-
derivedProjectDirectory =
|
|
35129
|
+
derivedProjectDirectory = joinPathFragments3(layoutDirectory, derivedProjectDirectory);
|
|
35130
35130
|
}
|
|
35131
35131
|
let derivedImportPath;
|
|
35132
35132
|
if (options.projectType === "library") {
|
|
@@ -43120,7 +43120,7 @@ var require_dist = __commonJS({
|
|
|
43120
43120
|
loadTsConfig: () => loadTsConfig2
|
|
43121
43121
|
});
|
|
43122
43122
|
module2.exports = __toCommonJS2(src_exports);
|
|
43123
|
-
var
|
|
43123
|
+
var import_path4 = __toESM2(require("path"), 1);
|
|
43124
43124
|
var import_fs4 = __toESM2(require("fs"), 1);
|
|
43125
43125
|
var singleComment = Symbol("singleComment");
|
|
43126
43126
|
var multiComment = Symbol("multiComment");
|
|
@@ -43216,10 +43216,10 @@ var require_dist = __commonJS({
|
|
|
43216
43216
|
}
|
|
43217
43217
|
}
|
|
43218
43218
|
var req = false ? createRequire(import_meta.url) : require;
|
|
43219
|
-
var findUp = (name, startDir, stopDir =
|
|
43219
|
+
var findUp = (name, startDir, stopDir = import_path4.default.parse(startDir).root) => {
|
|
43220
43220
|
let dir = startDir;
|
|
43221
43221
|
while (dir !== stopDir) {
|
|
43222
|
-
const file =
|
|
43222
|
+
const file = import_path4.default.join(dir, name);
|
|
43223
43223
|
if (import_fs4.default.existsSync(file))
|
|
43224
43224
|
return file;
|
|
43225
43225
|
if (!file.endsWith(".json")) {
|
|
@@ -43227,17 +43227,17 @@ var require_dist = __commonJS({
|
|
|
43227
43227
|
if (import_fs4.default.existsSync(fileWithExt))
|
|
43228
43228
|
return fileWithExt;
|
|
43229
43229
|
}
|
|
43230
|
-
dir =
|
|
43230
|
+
dir = import_path4.default.dirname(dir);
|
|
43231
43231
|
}
|
|
43232
43232
|
return null;
|
|
43233
43233
|
};
|
|
43234
43234
|
var resolveTsConfigFromFile = (cwd, filename) => {
|
|
43235
|
-
if (
|
|
43235
|
+
if (import_path4.default.isAbsolute(filename))
|
|
43236
43236
|
return import_fs4.default.existsSync(filename) ? filename : null;
|
|
43237
43237
|
return findUp(filename, cwd);
|
|
43238
43238
|
};
|
|
43239
43239
|
var resolveTsConfigFromExtends = (cwd, name) => {
|
|
43240
|
-
if (
|
|
43240
|
+
if (import_path4.default.isAbsolute(name))
|
|
43241
43241
|
return import_fs4.default.existsSync(name) ? name : null;
|
|
43242
43242
|
if (name.startsWith("."))
|
|
43243
43243
|
return findUp(name, cwd);
|
|
@@ -43246,14 +43246,14 @@ var require_dist = __commonJS({
|
|
|
43246
43246
|
};
|
|
43247
43247
|
var loadTsConfigInternal = (dir = process.cwd(), name = "tsconfig.json", isExtends = false) => {
|
|
43248
43248
|
var _a, _b;
|
|
43249
|
-
dir =
|
|
43249
|
+
dir = import_path4.default.resolve(dir);
|
|
43250
43250
|
const id = isExtends ? resolveTsConfigFromExtends(dir, name) : resolveTsConfigFromFile(dir, name);
|
|
43251
43251
|
if (!id)
|
|
43252
43252
|
return null;
|
|
43253
43253
|
const data = jsoncParse(import_fs4.default.readFileSync(id, "utf-8"));
|
|
43254
|
-
const configDir =
|
|
43254
|
+
const configDir = import_path4.default.dirname(id);
|
|
43255
43255
|
if ((_a = data.compilerOptions) == null ? void 0 : _a.baseUrl) {
|
|
43256
|
-
data.compilerOptions.baseUrl =
|
|
43256
|
+
data.compilerOptions.baseUrl = import_path4.default.join(
|
|
43257
43257
|
configDir,
|
|
43258
43258
|
data.compilerOptions.baseUrl
|
|
43259
43259
|
);
|
|
@@ -43336,11 +43336,11 @@ var require_dist2 = __commonJS({
|
|
|
43336
43336
|
var import_esbuild = require("esbuild");
|
|
43337
43337
|
var import_load_tsconfig = require_dist();
|
|
43338
43338
|
var import_fs4 = __toESM2(require("fs"), 1);
|
|
43339
|
-
var
|
|
43339
|
+
var import_path4 = __toESM2(require("path"), 1);
|
|
43340
43340
|
var getPkgType = () => {
|
|
43341
43341
|
try {
|
|
43342
43342
|
const pkg = JSON.parse(
|
|
43343
|
-
import_fs4.default.readFileSync(
|
|
43343
|
+
import_fs4.default.readFileSync(import_path4.default.resolve("package.json"), "utf-8")
|
|
43344
43344
|
);
|
|
43345
43345
|
return pkg.type;
|
|
43346
43346
|
} catch (error) {
|
|
@@ -43349,7 +43349,7 @@ var require_dist2 = __commonJS({
|
|
|
43349
43349
|
function guessFormat(inputFile) {
|
|
43350
43350
|
if (!usingDynamicImport)
|
|
43351
43351
|
return "cjs";
|
|
43352
|
-
const ext2 =
|
|
43352
|
+
const ext2 = import_path4.default.extname(inputFile);
|
|
43353
43353
|
const type = getPkgType();
|
|
43354
43354
|
if (ext2 === ".js") {
|
|
43355
43355
|
return type === "module" ? "esm" : "cjs";
|
|
@@ -69156,7 +69156,7 @@ var require_util5 = __commonJS({
|
|
|
69156
69156
|
var normalize2 = createSafeHandler((url) => {
|
|
69157
69157
|
});
|
|
69158
69158
|
exports.normalize = normalize2;
|
|
69159
|
-
function
|
|
69159
|
+
function join3(aRoot, aPath) {
|
|
69160
69160
|
const pathType = getURLType(aPath);
|
|
69161
69161
|
const rootType = getURLType(aRoot);
|
|
69162
69162
|
aRoot = ensureDirectory(aRoot);
|
|
@@ -69182,7 +69182,7 @@ var require_util5 = __commonJS({
|
|
|
69182
69182
|
const newPath = withBase(aPath, withBase(aRoot, base));
|
|
69183
69183
|
return computeRelativeURL(base, newPath);
|
|
69184
69184
|
}
|
|
69185
|
-
exports.join =
|
|
69185
|
+
exports.join = join3;
|
|
69186
69186
|
function relative(rootURL, targetURL) {
|
|
69187
69187
|
const result = relativeIfPossible(rootURL, targetURL);
|
|
69188
69188
|
return typeof result === "string" ? result : normalize2(targetURL);
|
|
@@ -69212,9 +69212,9 @@ var require_util5 = __commonJS({
|
|
|
69212
69212
|
}
|
|
69213
69213
|
let url = normalize2(sourceURL || "");
|
|
69214
69214
|
if (sourceRoot)
|
|
69215
|
-
url =
|
|
69215
|
+
url = join3(sourceRoot, url);
|
|
69216
69216
|
if (sourceMapURL)
|
|
69217
|
-
url =
|
|
69217
|
+
url = join3(trimFilename(sourceMapURL), url);
|
|
69218
69218
|
return url;
|
|
69219
69219
|
}
|
|
69220
69220
|
exports.computeSourceURL = computeSourceURL;
|
|
@@ -70980,7 +70980,7 @@ var require_source_map = __commonJS({
|
|
|
70980
70980
|
var require_native = __commonJS({
|
|
70981
70981
|
"node_modules/.pnpm/rollup@4.5.0/node_modules/rollup/dist/native.js"(exports, module2) {
|
|
70982
70982
|
var { existsSync: existsSync2 } = require("node:fs");
|
|
70983
|
-
var { join:
|
|
70983
|
+
var { join: join3 } = require("node:path");
|
|
70984
70984
|
var { platform, arch, report } = require("node:process");
|
|
70985
70985
|
var isMusl = () => !report.getReport().header.glibcVersionRuntime;
|
|
70986
70986
|
var bindingsByPlatformAndArch = {
|
|
@@ -71030,7 +71030,7 @@ If this is important to you, please consider supporting Rollup to make a native
|
|
|
71030
71030
|
return imported.base;
|
|
71031
71031
|
}
|
|
71032
71032
|
var localName = `./rollup.${packageBase}.node`;
|
|
71033
|
-
var { parse, parseAsync, xxhashBase64Url } = existsSync2(
|
|
71033
|
+
var { parse, parseAsync, xxhashBase64Url } = existsSync2(join3(__dirname, localName)) ? require(localName) : require(`@rollup/rollup-${packageBase}`);
|
|
71034
71034
|
module2.exports.parse = parse;
|
|
71035
71035
|
module2.exports.parseAsync = parseAsync;
|
|
71036
71036
|
module2.exports.xxhashBase64Url = xxhashBase64Url;
|
|
@@ -106594,7 +106594,7 @@ __export(executor_exports, {
|
|
|
106594
106594
|
});
|
|
106595
106595
|
module.exports = __toCommonJS(executor_exports);
|
|
106596
106596
|
var import_esbuild_decorators = __toESM(require_src());
|
|
106597
|
-
var
|
|
106597
|
+
var import_devkit2 = __toESM(require_devkit());
|
|
106598
106598
|
var import_get_extra_dependencies = __toESM(require_get_extra_dependencies());
|
|
106599
106599
|
var import_js = __toESM(require_src2());
|
|
106600
106600
|
var import_normalize_options = __toESM(require_normalize_options());
|
|
@@ -112823,7 +112823,7 @@ glob.glob = glob;
|
|
|
112823
112823
|
|
|
112824
112824
|
// packages/workspace-tools/src/executors/tsup/executor.ts
|
|
112825
112825
|
var import_fileutils = require("nx/src/utils/fileutils");
|
|
112826
|
-
var
|
|
112826
|
+
var import_path3 = require("path");
|
|
112827
112827
|
var import_prettier = require("prettier");
|
|
112828
112828
|
var import_tsup2 = __toESM(require_dist5());
|
|
112829
112829
|
var ts = __toESM(require("typescript"));
|
|
@@ -116980,7 +116980,7 @@ var removeExtension = (filePath) => {
|
|
|
116980
116980
|
};
|
|
116981
116981
|
|
|
116982
116982
|
// packages/workspace-tools/src/executors/tsup/get-config.ts
|
|
116983
|
-
var
|
|
116983
|
+
var import_devkit = __toESM(require_devkit());
|
|
116984
116984
|
var import_tsup = __toESM(require_dist5());
|
|
116985
116985
|
function modernConfig({
|
|
116986
116986
|
entry,
|
|
@@ -117005,7 +117005,7 @@ function modernConfig({
|
|
|
117005
117005
|
generatePackageJson,
|
|
117006
117006
|
dtsTsConfig
|
|
117007
117007
|
}) {
|
|
117008
|
-
let outputPath = (0,
|
|
117008
|
+
let outputPath = (0, import_devkit.joinPathFragments)(outDir, "dist", "modern");
|
|
117009
117009
|
return {
|
|
117010
117010
|
name: "modern",
|
|
117011
117011
|
entry,
|
|
@@ -117084,7 +117084,7 @@ function legacyConfig({
|
|
|
117084
117084
|
generatePackageJson,
|
|
117085
117085
|
dtsTsConfig
|
|
117086
117086
|
}) {
|
|
117087
|
-
let outputPath = (0,
|
|
117087
|
+
let outputPath = (0, import_devkit.joinPathFragments)(outDir, "dist", "legacy");
|
|
117088
117088
|
return {
|
|
117089
117089
|
name: "legacy",
|
|
117090
117090
|
entry,
|
|
@@ -117150,14 +117150,14 @@ function workerConfig({
|
|
|
117150
117150
|
apiReport = true,
|
|
117151
117151
|
docModel = true,
|
|
117152
117152
|
tsdocMetadata = true,
|
|
117153
|
-
shims =
|
|
117153
|
+
shims = true,
|
|
117154
117154
|
define: define2,
|
|
117155
117155
|
env,
|
|
117156
117156
|
plugins,
|
|
117157
117157
|
generatePackageJson,
|
|
117158
117158
|
dtsTsConfig
|
|
117159
117159
|
}) {
|
|
117160
|
-
let outputPath = (0,
|
|
117160
|
+
let outputPath = (0, import_devkit.joinPathFragments)(outDir, "dist");
|
|
117161
117161
|
return {
|
|
117162
117162
|
name: "worker",
|
|
117163
117163
|
entry,
|
|
@@ -117192,13 +117192,13 @@ function workerConfig({
|
|
|
117192
117192
|
}
|
|
117193
117193
|
}
|
|
117194
117194
|
},
|
|
117195
|
-
|
|
117195
|
+
minify: debug ? false : "terser",
|
|
117196
117196
|
terserOptions: {
|
|
117197
117197
|
compress: true,
|
|
117198
117198
|
ecma: 2020,
|
|
117199
117199
|
keep_classnames: true,
|
|
117200
117200
|
keep_fnames: true
|
|
117201
|
-
}
|
|
117201
|
+
},
|
|
117202
117202
|
apiReport,
|
|
117203
117203
|
docModel,
|
|
117204
117204
|
tsdocMetadata,
|
|
@@ -117218,20 +117218,32 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
|
117218
117218
|
}) {
|
|
117219
117219
|
const entry = globSync(
|
|
117220
117220
|
[
|
|
117221
|
-
rest.entry ? rest.entry : (0,
|
|
117221
|
+
rest.entry ? rest.entry : (0, import_devkit.joinPathFragments)(
|
|
117222
|
+
sourceRoot.includes(workspaceRoot) ? sourceRoot : (0, import_devkit.joinPathFragments)(workspaceRoot, sourceRoot),
|
|
117223
|
+
"**/*.{ts,tsx}"
|
|
117224
|
+
),
|
|
117222
117225
|
...additionalEntryPoints ?? []
|
|
117223
117226
|
],
|
|
117224
117227
|
{
|
|
117225
117228
|
withFileTypes: true
|
|
117226
117229
|
}
|
|
117227
117230
|
).reduce((ret, filePath) => {
|
|
117228
|
-
let propertyKey = (0,
|
|
117231
|
+
let propertyKey = (0, import_devkit.joinPathFragments)(
|
|
117232
|
+
filePath.path,
|
|
117233
|
+
removeExtension(filePath.name)
|
|
117234
|
+
).replaceAll(workspaceRoot, "").replaceAll("\\", "/").replaceAll(sourceRoot, "").replaceAll(projectRoot, "");
|
|
117229
117235
|
if (propertyKey) {
|
|
117230
117236
|
while (propertyKey.startsWith("/")) {
|
|
117231
117237
|
propertyKey = propertyKey.substring(1);
|
|
117232
117238
|
}
|
|
117239
|
+
console.debug(
|
|
117240
|
+
`Trying to add entry point ${propertyKey} at "${(0, import_devkit.joinPathFragments)(
|
|
117241
|
+
filePath.path,
|
|
117242
|
+
filePath.name
|
|
117243
|
+
)}"`
|
|
117244
|
+
);
|
|
117233
117245
|
if (!(propertyKey in ret)) {
|
|
117234
|
-
ret[propertyKey] = (0,
|
|
117246
|
+
ret[propertyKey] = (0, import_devkit.joinPathFragments)(filePath.path, filePath.name);
|
|
117235
117247
|
}
|
|
117236
117248
|
}
|
|
117237
117249
|
return ret;
|
|
@@ -117326,8 +117338,8 @@ ${Object.keys(options).map(
|
|
|
117326
117338
|
if (!result.success) {
|
|
117327
117339
|
throw new Error("The Build process failed trying to copy assets");
|
|
117328
117340
|
}
|
|
117329
|
-
const workspacePackageJson = (0,
|
|
117330
|
-
(0,
|
|
117341
|
+
const workspacePackageJson = (0, import_devkit2.readJsonFile)(
|
|
117342
|
+
(0, import_path3.join)(workspaceRoot, "package.json")
|
|
117331
117343
|
);
|
|
117332
117344
|
options.external = options.external || [];
|
|
117333
117345
|
if (workspacePackageJson?.dependencies) {
|
|
@@ -117346,8 +117358,8 @@ ${Object.keys(options).map(
|
|
|
117346
117358
|
options.external = implicitDependencies.reduce(
|
|
117347
117359
|
(ret, key) => {
|
|
117348
117360
|
if (context.projectsConfigurations.projects[key].root) {
|
|
117349
|
-
const packageJson = (0,
|
|
117350
|
-
(0,
|
|
117361
|
+
const packageJson = (0, import_devkit2.readJsonFile)(
|
|
117362
|
+
(0, import_path3.join)(
|
|
117351
117363
|
context.root,
|
|
117352
117364
|
context.projectsConfigurations.projects[key].root,
|
|
117353
117365
|
"package.json"
|
|
@@ -117413,9 +117425,9 @@ ${externalDependencies.map((dep) => {
|
|
|
117413
117425
|
endOfLine: "lf"
|
|
117414
117426
|
};
|
|
117415
117427
|
if (options.generatePackageJson !== false) {
|
|
117416
|
-
const projectGraph = (0,
|
|
117417
|
-
const pathToPackageJson = (0,
|
|
117418
|
-
const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0,
|
|
117428
|
+
const projectGraph = (0, import_devkit2.readCachedProjectGraph)();
|
|
117429
|
+
const pathToPackageJson = (0, import_path3.join)(context.root, projectRoot, "package.json");
|
|
117430
|
+
const packageJson = (0, import_fileutils.fileExists)(pathToPackageJson) ? (0, import_devkit2.readJsonFile)(pathToPackageJson) : { name: context.projectName, version: "0.0.1" };
|
|
117419
117431
|
delete packageJson.dependencies;
|
|
117420
117432
|
externalDependencies.forEach((entry) => {
|
|
117421
117433
|
const packageConfig = entry.node.data;
|
|
@@ -117439,13 +117451,31 @@ ${externalDependencies.map((dep) => {
|
|
|
117439
117451
|
types: "./dist/modern/index.d.cts",
|
|
117440
117452
|
default: "./dist/modern/index.cjs"
|
|
117441
117453
|
},
|
|
117454
|
+
default: {
|
|
117455
|
+
types: "./dist/modern/**/*.d.ts",
|
|
117456
|
+
default: "./dist/modern/**/*.js"
|
|
117457
|
+
},
|
|
117458
|
+
"./*": {
|
|
117459
|
+
"import": {
|
|
117460
|
+
types: "./dist/modern/**/*.d.ts",
|
|
117461
|
+
default: "./dist/modern/**/*.js"
|
|
117462
|
+
},
|
|
117463
|
+
require: {
|
|
117464
|
+
types: "./dist/modern/**/*.d.cts",
|
|
117465
|
+
default: "./dist/modern/**/*.cjs"
|
|
117466
|
+
},
|
|
117467
|
+
"default": {
|
|
117468
|
+
types: "./dist/modern/**/*.d.ts",
|
|
117469
|
+
default: "./dist/modern/**/*.js"
|
|
117470
|
+
}
|
|
117471
|
+
},
|
|
117442
117472
|
...(options.additionalEntryPoints ?? []).map((entryPoint) => ({
|
|
117443
117473
|
[removeExtension(entryPoint).replace(sourceRoot, "")]: {
|
|
117444
|
-
types: (0,
|
|
117474
|
+
types: (0, import_path3.join)(
|
|
117445
117475
|
"./dist/modern",
|
|
117446
117476
|
`${removeExtension(entryPoint.replace(sourceRoot, ""))}.d.ts`
|
|
117447
117477
|
),
|
|
117448
|
-
default: (0,
|
|
117478
|
+
default: (0, import_path3.join)(
|
|
117449
117479
|
"./dist/modern",
|
|
117450
117480
|
`${removeExtension(entryPoint.replace(sourceRoot, ""))}.js`
|
|
117451
117481
|
)
|
|
@@ -117456,6 +117486,10 @@ ${externalDependencies.map((dep) => {
|
|
|
117456
117486
|
};
|
|
117457
117487
|
packageJson.funding ??= workspacePackageJson.funding;
|
|
117458
117488
|
packageJson.types ??= "dist/legacy/index.d.ts";
|
|
117489
|
+
packageJson.typings ??= "dist/legacy/index.d.ts";
|
|
117490
|
+
packageJson.typescript ??= {
|
|
117491
|
+
definition: "dist/legacy/index.d.ts"
|
|
117492
|
+
};
|
|
117459
117493
|
packageJson.main ??= "dist/legacy/index.cjs";
|
|
117460
117494
|
packageJson.module ??= "dist/legacy/index.js";
|
|
117461
117495
|
options.platform && options.platform !== "node" && (packageJson.browser ??= "dist/modern/index.global.js");
|
|
@@ -117464,15 +117498,15 @@ ${externalDependencies.map((dep) => {
|
|
|
117464
117498
|
if (distSrc.startsWith("/")) {
|
|
117465
117499
|
distSrc = distSrc.substring(1);
|
|
117466
117500
|
}
|
|
117467
|
-
packageJson.source ??= `${(0,
|
|
117501
|
+
packageJson.source ??= `${(0, import_path3.join)(distSrc, "index.ts").replaceAll(
|
|
117468
117502
|
"\\",
|
|
117469
117503
|
"/"
|
|
117470
117504
|
)}`;
|
|
117471
117505
|
}
|
|
117472
117506
|
packageJson.sideEffects ??= false;
|
|
117473
|
-
packageJson.files ??= ["dist"];
|
|
117507
|
+
packageJson.files ??= ["dist/**/*"];
|
|
117474
117508
|
if (options.includeSrc !== false && !packageJson.files.includes("src")) {
|
|
117475
|
-
packageJson.files.push("src");
|
|
117509
|
+
packageJson.files.push("src/**/*");
|
|
117476
117510
|
}
|
|
117477
117511
|
packageJson.publishConfig ??= {
|
|
117478
117512
|
access: "public"
|
|
@@ -117484,8 +117518,8 @@ ${externalDependencies.map((dep) => {
|
|
|
117484
117518
|
packageJson.license ??= workspacePackageJson.license;
|
|
117485
117519
|
packageJson.keywords ??= workspacePackageJson.keywords;
|
|
117486
117520
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
117487
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot : (0,
|
|
117488
|
-
const packageJsonPath = (0,
|
|
117521
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : (0, import_path3.join)("packages", context.projectName);
|
|
117522
|
+
const packageJsonPath = (0, import_path3.join)(
|
|
117489
117523
|
context.root,
|
|
117490
117524
|
options.outputPath,
|
|
117491
117525
|
"package.json"
|
|
@@ -117501,10 +117535,10 @@ ${externalDependencies.map((dep) => {
|
|
|
117501
117535
|
}
|
|
117502
117536
|
if (options.includeSrc !== false) {
|
|
117503
117537
|
const files = globSync([
|
|
117504
|
-
(0,
|
|
117505
|
-
(0,
|
|
117506
|
-
(0,
|
|
117507
|
-
(0,
|
|
117538
|
+
(0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.ts"),
|
|
117539
|
+
(0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.tsx"),
|
|
117540
|
+
(0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.js"),
|
|
117541
|
+
(0, import_devkit2.joinPathFragments)(context.root, options.outputPath, "src/**/*.jsx")
|
|
117508
117542
|
]);
|
|
117509
117543
|
await Promise.allSettled(
|
|
117510
117544
|
files.map(
|
|
@@ -117606,15 +117640,15 @@ function getNormalizedTsConfig(workspaceRoot, outputPath, options) {
|
|
|
117606
117640
|
declaration: true,
|
|
117607
117641
|
declarationMap: true,
|
|
117608
117642
|
emitDeclarationOnly: true,
|
|
117609
|
-
declarationDir: (0,
|
|
117643
|
+
declarationDir: (0, import_path3.join)(workspaceRoot, "tmp", ".tsup", "declaration")
|
|
117610
117644
|
}
|
|
117611
117645
|
},
|
|
117612
117646
|
ts.sys,
|
|
117613
|
-
(0,
|
|
117647
|
+
(0, import_path3.dirname)(options.tsConfig)
|
|
117614
117648
|
);
|
|
117615
117649
|
tsConfig.options.pathsBasePath = workspaceRoot;
|
|
117616
117650
|
if (tsConfig.options.incremental && !tsConfig.options.tsBuildInfoFile) {
|
|
117617
|
-
tsConfig.options.tsBuildInfoFile = (0,
|
|
117651
|
+
tsConfig.options.tsBuildInfoFile = (0, import_devkit2.joinPathFragments)(
|
|
117618
117652
|
outputPath,
|
|
117619
117653
|
"tsconfig.tsbuildinfo"
|
|
117620
117654
|
);
|
|
@@ -117649,7 +117683,7 @@ var applyDefaultOptions = (options) => {
|
|
|
117649
117683
|
options.additionalEntryPoints ??= [];
|
|
117650
117684
|
options.assets ??= [];
|
|
117651
117685
|
options.plugins ??= [];
|
|
117652
|
-
options.includeSrc ??=
|
|
117686
|
+
options.includeSrc ??= false;
|
|
117653
117687
|
options.clean ??= true;
|
|
117654
117688
|
options.bundle ??= true;
|
|
117655
117689
|
options.debug ??= false;
|
|
@@ -117659,6 +117693,7 @@ var applyDefaultOptions = (options) => {
|
|
|
117659
117693
|
options.tsdocMetadata ??= true;
|
|
117660
117694
|
options.define ??= {};
|
|
117661
117695
|
options.env ??= {};
|
|
117696
|
+
options.verbose ??= !!process.env.CI;
|
|
117662
117697
|
return options;
|
|
117663
117698
|
};
|
|
117664
117699
|
var executor_default = withRunExecutor(
|