@reliverse/dler 1.4.6 → 1.5.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/README.md +8 -8
- package/bin/{addons.js → app/agg/run.js} +1 -1
- package/bin/app/build/cmd.js +2 -2
- package/bin/app/build/impl.js +97 -0
- package/bin/app/pub/cmd.js +2 -2
- package/bin/{dler.js → cli.js} +2 -2
- package/bin/init/info.d.ts +2 -0
- package/bin/{info.js → init/info.js} +0 -1
- package/bin/{init.js → init/init.js} +22 -4
- package/bin/{load.d.ts → init/load.d.ts} +1 -1
- package/bin/{load.js → init/load.js} +1 -1
- package/bin/{default.d.ts → libs/sdk/default.d.ts} +1 -1
- package/bin/{default.js → libs/sdk/default.js} +21 -10
- package/bin/libs/sdk/sdk-impl/build/build-library.d.ts +20 -28
- package/bin/libs/sdk/sdk-impl/build/build-library.js +12 -21
- package/bin/libs/sdk/sdk-impl/build/build-regular.d.ts +4 -11
- package/bin/libs/sdk/sdk-impl/build/build-regular.js +161 -118
- package/bin/libs/sdk/sdk-impl/library-flow.d.ts +11 -4
- package/bin/libs/sdk/sdk-impl/library-flow.js +29 -29
- package/bin/libs/sdk/sdk-impl/pub/pub-library.d.ts +1 -1
- package/bin/libs/sdk/sdk-impl/pub/pub-regular.d.ts +1 -1
- package/bin/libs/sdk/sdk-impl/regular-flow.d.ts +2 -9
- package/bin/libs/sdk/sdk-impl/regular-flow.js +91 -142
- package/bin/libs/sdk/sdk-impl/utils/finalize.d.ts +1 -2
- package/bin/libs/sdk/sdk-impl/utils/finalize.js +1 -3
- package/bin/libs/sdk/sdk-impl/utils/utils-build.js +8 -5
- package/bin/libs/sdk/sdk-impl/utils/utils-deps.d.ts +2 -2
- package/bin/libs/sdk/sdk-impl/utils/utils-deps.js +31 -7
- package/bin/libs/sdk/sdk-impl/utils/utils-error.d.ts +1 -1
- package/bin/libs/sdk/sdk-impl/utils/utils-perf.d.ts +1 -5
- package/bin/libs/sdk/sdk-impl/utils/utils-pkg-json-libs.d.ts +2 -2
- package/bin/libs/sdk/sdk-impl/utils/utils-pkg-json-libs.js +72 -91
- package/bin/libs/sdk/sdk-impl/utils/utils-pkg-json-reg.d.ts +2 -2
- package/bin/libs/sdk/sdk-impl/utils/utils-pkg-json-reg.js +19 -44
- package/bin/libs/sdk/sdk-mod.d.ts +0 -1
- package/bin/libs/sdk/sdk-types.d.ts +41 -20
- package/bin/mod.js +1 -1
- package/package.json +8 -22
- package/bin/impl.js +0 -219
- package/bin/info.d.ts +0 -3
- /package/bin/{addons.d.ts → app/agg/run.d.ts} +0 -0
- /package/bin/{impl.d.ts → app/build/impl.d.ts} +0 -0
- /package/bin/{dler.d.ts → cli.d.ts} +0 -0
- /package/bin/{init.d.ts → init/init.d.ts} +0 -0
|
@@ -5,12 +5,12 @@ import path, {
|
|
|
5
5
|
import fs from "@reliverse/relifso";
|
|
6
6
|
import { relinka } from "@reliverse/relinka";
|
|
7
7
|
import { build as bunBuild } from "bun";
|
|
8
|
-
import prettyBytes from "pretty-bytes";
|
|
9
8
|
import prettyMilliseconds from "pretty-ms";
|
|
10
9
|
import { unifiedBuild } from "./bundlers/unified/build.js";
|
|
11
10
|
import {
|
|
12
11
|
getBunSourcemapOption,
|
|
13
|
-
getUnifiedSourcemapOption
|
|
12
|
+
getUnifiedSourcemapOption,
|
|
13
|
+
renameEntryFile
|
|
14
14
|
} from "../utils/utils-build.js";
|
|
15
15
|
import { removeLogInternalCalls } from "../utils/utils-clean.js";
|
|
16
16
|
import {
|
|
@@ -20,129 +20,139 @@ import {
|
|
|
20
20
|
} from "../utils/utils-consts.js";
|
|
21
21
|
import {
|
|
22
22
|
copyRootFile,
|
|
23
|
-
deleteSpecificFiles
|
|
24
|
-
getDirectorySize,
|
|
25
|
-
outDirBinFilesCount
|
|
23
|
+
deleteSpecificFiles
|
|
26
24
|
} from "../utils/utils-fs.js";
|
|
27
25
|
import {
|
|
28
26
|
createJsrJSON,
|
|
29
27
|
renameTsxFiles
|
|
30
28
|
} from "../utils/utils-jsr-json.js";
|
|
31
|
-
import {
|
|
32
|
-
getElapsedPerfTime
|
|
33
|
-
} from "../utils/utils-perf.js";
|
|
29
|
+
import { getElapsedPerfTime } from "../utils/utils-perf.js";
|
|
34
30
|
import { regular_createPackageJSON } from "../utils/utils-pkg-json-reg.js";
|
|
35
|
-
import { createTSConfig } from "../utils/utils-tsconfig.js";
|
|
36
31
|
const ALIAS_PREFIX_TO_CONVERT = "~";
|
|
37
|
-
export async function regular_buildJsrDist(isDev, isJsr, coreIsCLI, coreEntrySrcDir, distJsrDirName, distJsrBuilder, coreEntryFile, transpileTarget, transpileFormat, transpileSplitting, transpileMinify, transpileSourcemap, transpilePublicPath, unifiedBundlerOutExt,
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const outDirBin = path.resolve(
|
|
43
|
-
distJsrDirNameResolved,
|
|
44
|
-
config.coreBuildOutDir || "bin"
|
|
45
|
-
);
|
|
46
|
-
await fs.ensureDir(distJsrDirNameResolved);
|
|
47
|
-
await fs.ensureDir(outDirBin);
|
|
48
|
-
relinka("log", `Using JSR builder: ${distJsrBuilder}`);
|
|
49
|
-
await regular_bundleWithBuilder(distJsrBuilder, {
|
|
50
|
-
coreDeclarations,
|
|
51
|
-
outDir: outDirBin,
|
|
52
|
-
packageName: "",
|
|
53
|
-
// not strictly needed, keeping it for logs
|
|
54
|
-
singleFile: coreEntryFilePath,
|
|
55
|
-
// single entry (used if "bun"/"unified")
|
|
56
|
-
srcDir: coreEntrySrcDirResolved,
|
|
57
|
-
// entire dir (used if "jsr")
|
|
58
|
-
timer,
|
|
59
|
-
transpileFormat,
|
|
60
|
-
transpileMinify,
|
|
61
|
-
transpilePublicPath,
|
|
62
|
-
transpileSourcemap,
|
|
63
|
-
transpileSplitting,
|
|
64
|
-
transpileStub,
|
|
65
|
-
transpileTarget,
|
|
66
|
-
transpileWatch,
|
|
67
|
-
unifiedBundlerOutExt
|
|
68
|
-
});
|
|
69
|
-
await regular_performCommonBuildSteps({
|
|
70
|
-
coreIsCLI,
|
|
71
|
-
isJsr,
|
|
72
|
-
outDirBin,
|
|
73
|
-
outDirRoot: distJsrDirNameResolved,
|
|
74
|
-
rmDepsMode,
|
|
75
|
-
unifiedBundlerOutExt,
|
|
76
|
-
coreDescription: config.coreDescription,
|
|
77
|
-
coreBuildOutDir: config.coreBuildOutDir
|
|
78
|
-
});
|
|
79
|
-
await renameTsxFiles(outDirBin);
|
|
80
|
-
await createJsrJSON(
|
|
81
|
-
distJsrDirNameResolved,
|
|
82
|
-
false,
|
|
83
|
-
void 0,
|
|
84
|
-
config.coreDescription
|
|
85
|
-
);
|
|
86
|
-
if (coreIsCLI.enabled && isJsr && distJsrGenTsconfig) {
|
|
87
|
-
await createTSConfig(distJsrDirNameResolved, true);
|
|
88
|
-
}
|
|
89
|
-
const dirSize = await getDirectorySize(distJsrDirNameResolved, isDev);
|
|
90
|
-
const filesCount = await outDirBinFilesCount(outDirBin);
|
|
32
|
+
export async function regular_buildJsrDist(isDev, isJsr, coreIsCLI, coreEntrySrcDir, distJsrDirName, distJsrBuilder, coreEntryFile, transpileTarget, transpileFormat, transpileSplitting, transpileMinify, transpileSourcemap, transpilePublicPath, unifiedBundlerOutExt, config, timer, transpileStub, transpileWatch, distJsrGenTsconfig, coreDeclarations) {
|
|
33
|
+
const outDirRoot = path.join(process.cwd(), distJsrDirName);
|
|
34
|
+
const outDirBin = path.join(outDirRoot, config.coreBuildOutDir || "bin");
|
|
35
|
+
const singleFile = path.join(process.cwd(), coreEntrySrcDir, coreEntryFile);
|
|
36
|
+
const srcDir = path.join(process.cwd(), coreEntrySrcDir);
|
|
91
37
|
relinka(
|
|
92
|
-
"
|
|
93
|
-
`
|
|
94
|
-
dirSize
|
|
95
|
-
)}))`
|
|
38
|
+
"log",
|
|
39
|
+
`Building JSR distribution (isDev=${isDev}, isJsr=${isJsr})...`
|
|
96
40
|
);
|
|
41
|
+
try {
|
|
42
|
+
await fs.ensureDir(outDirBin);
|
|
43
|
+
await regular_bundleWithBuilder(distJsrBuilder, {
|
|
44
|
+
coreDeclarations,
|
|
45
|
+
outDir: outDirBin,
|
|
46
|
+
singleFile,
|
|
47
|
+
srcDir,
|
|
48
|
+
timer,
|
|
49
|
+
transpileFormat,
|
|
50
|
+
transpileMinify,
|
|
51
|
+
transpilePublicPath,
|
|
52
|
+
transpileSourcemap,
|
|
53
|
+
transpileSplitting,
|
|
54
|
+
transpileStub,
|
|
55
|
+
transpileTarget,
|
|
56
|
+
transpileWatch,
|
|
57
|
+
unifiedBundlerOutExt
|
|
58
|
+
});
|
|
59
|
+
await regular_performCommonBuildSteps({
|
|
60
|
+
coreIsCLI,
|
|
61
|
+
isJsr,
|
|
62
|
+
outDirBin,
|
|
63
|
+
outDirRoot,
|
|
64
|
+
config,
|
|
65
|
+
unifiedBundlerOutExt,
|
|
66
|
+
coreDescription: config.coreDescription,
|
|
67
|
+
coreBuildOutDir: config.coreBuildOutDir
|
|
68
|
+
});
|
|
69
|
+
if (distJsrGenTsconfig) {
|
|
70
|
+
await regular_createTsconfig(outDirRoot);
|
|
71
|
+
}
|
|
72
|
+
relinka(
|
|
73
|
+
"verbose",
|
|
74
|
+
`Performing JSR-specific transformations in ${outDirBin}`
|
|
75
|
+
);
|
|
76
|
+
await renameTsxFiles(outDirBin);
|
|
77
|
+
await createJsrJSON(
|
|
78
|
+
outDirRoot,
|
|
79
|
+
false,
|
|
80
|
+
// isLib
|
|
81
|
+
config.coreDescription
|
|
82
|
+
);
|
|
83
|
+
const duration = getElapsedPerfTime(timer);
|
|
84
|
+
const transpileFormattedDuration = prettyMilliseconds(duration, {
|
|
85
|
+
verbose: true
|
|
86
|
+
});
|
|
87
|
+
relinka(
|
|
88
|
+
"success",
|
|
89
|
+
`JSR distribution built in ${transpileFormattedDuration}`
|
|
90
|
+
);
|
|
91
|
+
} catch (error) {
|
|
92
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
93
|
+
relinka("error", `Failed to build JSR distribution: ${errorMessage}`);
|
|
94
|
+
const enhancedError = new Error(
|
|
95
|
+
`JSR distribution build failed: ${errorMessage}`
|
|
96
|
+
);
|
|
97
|
+
if (error instanceof Error && error.stack) {
|
|
98
|
+
enhancedError.stack = error.stack;
|
|
99
|
+
}
|
|
100
|
+
throw enhancedError;
|
|
101
|
+
}
|
|
97
102
|
}
|
|
98
|
-
export async function regular_buildNpmDist(isDev, coreEntrySrcDir, distNpmDirName, distNpmBuilder, coreEntryFile, unifiedBundlerOutExt,
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
const
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
`
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
103
|
+
export async function regular_buildNpmDist(isDev, coreEntrySrcDir, distNpmDirName, distNpmBuilder, coreEntryFile, unifiedBundlerOutExt, config, coreIsCLI, transpileTarget, transpileFormat, transpileSplitting, transpileMinify, transpileSourcemap, transpilePublicPath, transpileStub, transpileWatch, timer, coreDeclarations) {
|
|
104
|
+
const outDirRoot = path.join(process.cwd(), distNpmDirName);
|
|
105
|
+
const outDirBin = path.join(outDirRoot, config.coreBuildOutDir || "bin");
|
|
106
|
+
const singleFile = path.join(process.cwd(), coreEntrySrcDir, coreEntryFile);
|
|
107
|
+
const srcDir = path.join(process.cwd(), coreEntrySrcDir);
|
|
108
|
+
relinka("log", `Building NPM distribution (isDev=${isDev})...`);
|
|
109
|
+
try {
|
|
110
|
+
await fs.ensureDir(outDirBin);
|
|
111
|
+
await regular_bundleWithBuilder(distNpmBuilder, {
|
|
112
|
+
coreDeclarations,
|
|
113
|
+
outDir: outDirBin,
|
|
114
|
+
singleFile,
|
|
115
|
+
srcDir,
|
|
116
|
+
timer,
|
|
117
|
+
transpileFormat,
|
|
118
|
+
transpileMinify,
|
|
119
|
+
transpilePublicPath,
|
|
120
|
+
transpileSourcemap,
|
|
121
|
+
transpileSplitting,
|
|
122
|
+
transpileStub,
|
|
123
|
+
transpileTarget,
|
|
124
|
+
transpileWatch,
|
|
125
|
+
unifiedBundlerOutExt
|
|
126
|
+
});
|
|
127
|
+
await regular_performCommonBuildSteps({
|
|
128
|
+
coreIsCLI,
|
|
129
|
+
isJsr: false,
|
|
130
|
+
outDirBin,
|
|
131
|
+
outDirRoot,
|
|
132
|
+
config,
|
|
133
|
+
unifiedBundlerOutExt,
|
|
134
|
+
coreDescription: config.coreDescription,
|
|
135
|
+
coreBuildOutDir: config.coreBuildOutDir
|
|
136
|
+
});
|
|
137
|
+
const duration = getElapsedPerfTime(timer);
|
|
138
|
+
const transpileFormattedDuration = prettyMilliseconds(duration, {
|
|
139
|
+
verbose: true
|
|
140
|
+
});
|
|
141
|
+
relinka(
|
|
142
|
+
"success",
|
|
143
|
+
`NPM distribution built in ${transpileFormattedDuration}`
|
|
144
|
+
);
|
|
145
|
+
} catch (error) {
|
|
146
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
147
|
+
relinka("error", `Failed to build NPM distribution: ${errorMessage}`);
|
|
148
|
+
const enhancedError = new Error(
|
|
149
|
+
`NPM distribution build failed: ${errorMessage}`
|
|
150
|
+
);
|
|
151
|
+
if (error instanceof Error && error.stack) {
|
|
152
|
+
enhancedError.stack = error.stack;
|
|
153
|
+
}
|
|
154
|
+
throw enhancedError;
|
|
155
|
+
}
|
|
146
156
|
}
|
|
147
157
|
async function regular_bundleUsingBun(coreEntryFile, outDirBin, transpileTarget, transpileFormat, transpileSplitting, transpileMinify, transpileSourcemap, transpilePublicPath, timer) {
|
|
148
158
|
relinka(
|
|
@@ -355,7 +365,7 @@ async function regular_performCommonBuildSteps({
|
|
|
355
365
|
isJsr,
|
|
356
366
|
outDirBin,
|
|
357
367
|
outDirRoot,
|
|
358
|
-
|
|
368
|
+
config,
|
|
359
369
|
unifiedBundlerOutExt,
|
|
360
370
|
coreDescription,
|
|
361
371
|
coreBuildOutDir
|
|
@@ -390,8 +400,7 @@ async function regular_performCommonBuildSteps({
|
|
|
390
400
|
isJsr,
|
|
391
401
|
coreIsCLI,
|
|
392
402
|
unifiedBundlerOutExt,
|
|
393
|
-
|
|
394
|
-
[],
|
|
403
|
+
config,
|
|
395
404
|
coreDescription,
|
|
396
405
|
coreBuildOutDir
|
|
397
406
|
);
|
|
@@ -405,4 +414,38 @@ async function regular_performCommonBuildSteps({
|
|
|
405
414
|
"schema.json"
|
|
406
415
|
]);
|
|
407
416
|
}
|
|
417
|
+
relinka("verbose", `Renaming entry file in ${outDirBin}.`);
|
|
418
|
+
await renameEntryFile(
|
|
419
|
+
isJsr,
|
|
420
|
+
outDirBin,
|
|
421
|
+
config.coreEntryFile,
|
|
422
|
+
unifiedBundlerOutExt,
|
|
423
|
+
config.distJsrOutFilesExt
|
|
424
|
+
);
|
|
425
|
+
}
|
|
426
|
+
async function regular_createTsconfig(outDirRoot) {
|
|
427
|
+
const tsconfigPath = path.join(outDirRoot, "tsconfig.json");
|
|
428
|
+
const tsconfig = {
|
|
429
|
+
compilerOptions: {
|
|
430
|
+
target: "ES2022",
|
|
431
|
+
module: "ESNext",
|
|
432
|
+
moduleResolution: "bundler",
|
|
433
|
+
declaration: true,
|
|
434
|
+
declarationMap: true,
|
|
435
|
+
sourceMap: true,
|
|
436
|
+
strict: true,
|
|
437
|
+
skipLibCheck: true,
|
|
438
|
+
esModuleInterop: true,
|
|
439
|
+
resolveJsonModule: true,
|
|
440
|
+
isolatedModules: true,
|
|
441
|
+
noUnusedLocals: true,
|
|
442
|
+
noUnusedParameters: true,
|
|
443
|
+
noImplicitReturns: true,
|
|
444
|
+
noFallthroughCasesInSwitch: true
|
|
445
|
+
},
|
|
446
|
+
include: ["**/*.ts"],
|
|
447
|
+
exclude: ["node_modules", "dist"]
|
|
448
|
+
};
|
|
449
|
+
await fs.writeFile(tsconfigPath, JSON.stringify(tsconfig, null, 2));
|
|
450
|
+
relinka("verbose", `Created tsconfig.json at ${tsconfigPath}`);
|
|
408
451
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import type { BundlerName, Esbuild,
|
|
2
|
-
import type { PerfTimer } from "./utils/utils-perf.js";
|
|
1
|
+
import type { BundlerName, Esbuild, LibConfig, NpmOutExt, Sourcemap, transpileFormat, transpileTarget, BuildPublishConfig, PerfTimer } from "../sdk-types.js";
|
|
3
2
|
/**
|
|
4
3
|
* Processes libraries based on build mode.
|
|
5
4
|
*/
|
|
6
|
-
export declare function processLibraryFlow(timer: PerfTimer, isDev: boolean,
|
|
5
|
+
export declare function processLibraryFlow(timer: PerfTimer, isDev: boolean, config: BuildPublishConfig): Promise<void>;
|
|
7
6
|
/**
|
|
8
7
|
* Processes all libs defined in config.libsList.
|
|
9
8
|
* Builds and optionally publishes each library based on configuration.
|
|
10
9
|
*/
|
|
11
|
-
export declare function libraries_buildPublish(isDev: boolean, timer: PerfTimer, libsList: Record<string, LibConfig>, distJsrDryRun: boolean, distJsrFailOnWarn: boolean, libsDirDist: string, libsDirSrc: string, commonPubPause: boolean, commonPubRegistry: "jsr" | "npm" | "npm-jsr", unifiedBundlerOutExt: NpmOutExt, distNpmBuilder: BundlerName, coreEntrySrcDir: string,
|
|
10
|
+
export declare function libraries_buildPublish(isDev: boolean, timer: PerfTimer, libsList: Record<string, LibConfig>, distJsrDryRun: boolean, distJsrFailOnWarn: boolean, libsDirDist: string, libsDirSrc: string, commonPubPause: boolean, commonPubRegistry: "jsr" | "npm" | "npm-jsr", unifiedBundlerOutExt: NpmOutExt, distNpmBuilder: BundlerName, coreEntrySrcDir: string, removeDepsPatterns: {
|
|
11
|
+
global: string[];
|
|
12
|
+
"dist-npm": string[];
|
|
13
|
+
"dist-jsr": string[];
|
|
14
|
+
"dist-libs": Record<string, {
|
|
15
|
+
npm: string[];
|
|
16
|
+
jsr: string[];
|
|
17
|
+
}>;
|
|
18
|
+
}, transpileEsbuild: Esbuild, transpileTarget: transpileTarget, transpileFormat: transpileFormat, transpileSplitting: boolean, transpileSourcemap: Sourcemap, transpilePublicPath: string, distJsrBuilder: BundlerName, transpileStub: boolean, transpileWatch: boolean, distJsrOutFilesExt: NpmOutExt, distJsrAllowDirty: boolean, distJsrSlowTypes: boolean, config: BuildPublishConfig): Promise<void>;
|
|
@@ -4,8 +4,8 @@ import pAll from "p-all";
|
|
|
4
4
|
import { library_buildLibrary } from "./build/build-library.js";
|
|
5
5
|
import { library_publishLibrary } from "./pub/pub-library.js";
|
|
6
6
|
import { CONCURRENCY_DEFAULT, PROJECT_ROOT } from "./utils/utils-consts.js";
|
|
7
|
-
export async function processLibraryFlow(timer, isDev,
|
|
8
|
-
if (libsActMode !== "libs-only" && libsActMode !== "main-and-libs") {
|
|
7
|
+
export async function processLibraryFlow(timer, isDev, config) {
|
|
8
|
+
if (config.libsActMode !== "libs-only" && config.libsActMode !== "main-and-libs") {
|
|
9
9
|
relinka(
|
|
10
10
|
"verbose",
|
|
11
11
|
"Skipping libs build/publish as libsActMode is set to 'main-project-only'"
|
|
@@ -15,30 +15,30 @@ export async function processLibraryFlow(timer, isDev, libsActMode, libsList, di
|
|
|
15
15
|
await libraries_buildPublish(
|
|
16
16
|
isDev,
|
|
17
17
|
timer,
|
|
18
|
-
libsList,
|
|
19
|
-
distJsrDryRun,
|
|
20
|
-
distJsrFailOnWarn,
|
|
21
|
-
libsDirDist,
|
|
22
|
-
libsDirSrc,
|
|
23
|
-
commonPubPause,
|
|
24
|
-
commonPubRegistry,
|
|
25
|
-
|
|
26
|
-
distNpmBuilder,
|
|
27
|
-
coreEntrySrcDir,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
18
|
+
config.libsList,
|
|
19
|
+
config.distJsrDryRun,
|
|
20
|
+
config.distJsrFailOnWarn,
|
|
21
|
+
config.libsDirDist,
|
|
22
|
+
config.libsDirSrc,
|
|
23
|
+
config.commonPubPause,
|
|
24
|
+
config.commonPubRegistry,
|
|
25
|
+
config.distNpmOutFilesExt,
|
|
26
|
+
config.distNpmBuilder,
|
|
27
|
+
config.coreEntrySrcDir,
|
|
28
|
+
config.removeDepsPatterns,
|
|
29
|
+
config.transpileEsbuild,
|
|
30
|
+
config.transpileTarget,
|
|
31
|
+
config.transpileFormat,
|
|
32
|
+
config.transpileSplitting,
|
|
33
|
+
config.transpileSourcemap,
|
|
34
|
+
config.transpilePublicPath,
|
|
35
|
+
config.distJsrBuilder,
|
|
36
|
+
config.transpileStub,
|
|
37
|
+
config.transpileWatch,
|
|
38
|
+
config.distJsrOutFilesExt,
|
|
39
|
+
config.distJsrAllowDirty,
|
|
40
|
+
config.distJsrSlowTypes,
|
|
41
|
+
config
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
44
|
function extractFolderName(libName, libConfig) {
|
|
@@ -56,7 +56,7 @@ function extractFolderName(libName, libConfig) {
|
|
|
56
56
|
}
|
|
57
57
|
return baseName;
|
|
58
58
|
}
|
|
59
|
-
export async function libraries_buildPublish(isDev, timer, libsList, distJsrDryRun, distJsrFailOnWarn, libsDirDist, libsDirSrc, commonPubPause, commonPubRegistry, unifiedBundlerOutExt, distNpmBuilder, coreEntrySrcDir,
|
|
59
|
+
export async function libraries_buildPublish(isDev, timer, libsList, distJsrDryRun, distJsrFailOnWarn, libsDirDist, libsDirSrc, commonPubPause, commonPubRegistry, unifiedBundlerOutExt, distNpmBuilder, coreEntrySrcDir, removeDepsPatterns, transpileEsbuild, transpileTarget, transpileFormat, transpileSplitting, transpileSourcemap, transpilePublicPath, distJsrBuilder, transpileStub, transpileWatch, distJsrOutFilesExt, distJsrAllowDirty, distJsrSlowTypes, config) {
|
|
60
60
|
relinka("verbose", "Starting libraries_buildPublish");
|
|
61
61
|
if (!libsList || Object.keys(libsList).length === 0) {
|
|
62
62
|
relinka("log", "No lib configs found in config, skipping libs build.");
|
|
@@ -91,6 +91,7 @@ export async function libraries_buildPublish(isDev, timer, libsList, distJsrDryR
|
|
|
91
91
|
);
|
|
92
92
|
const libTranspileMinify = libConfig?.libTranspileMinify === true;
|
|
93
93
|
await library_buildLibrary({
|
|
94
|
+
...config,
|
|
94
95
|
effectivePubRegistry: libConfig.libPubRegistry || commonPubRegistry,
|
|
95
96
|
libName,
|
|
96
97
|
mainDir: libMainDir,
|
|
@@ -108,8 +109,7 @@ export async function libraries_buildPublish(isDev, timer, libsList, distJsrDryR
|
|
|
108
109
|
isDev,
|
|
109
110
|
libsList,
|
|
110
111
|
unifiedBundlerOutExt,
|
|
111
|
-
|
|
112
|
-
rmDepsPatterns,
|
|
112
|
+
removeDepsPatterns,
|
|
113
113
|
transpileEsbuild,
|
|
114
114
|
transpileTarget,
|
|
115
115
|
transpileFormat,
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { PerfTimer } from "./utils/utils-perf.js";
|
|
1
|
+
import type { BuildPublishConfig, PerfTimer } from "../sdk-types.js";
|
|
3
2
|
/**
|
|
4
3
|
* Processes the main project based on build mode and commonPubRegistry.
|
|
5
4
|
*/
|
|
6
|
-
export declare function processRegularFlow(timer: PerfTimer, isDev: boolean,
|
|
7
|
-
enabled: boolean;
|
|
8
|
-
scripts: Record<string, string>;
|
|
9
|
-
}, libsActMode: string, commonPubRegistry: string, coreEntrySrcDir: string, distNpmDirName: string, distNpmBuilder: BundlerName, coreEntryFile: string, distJsrDryRun: boolean, distJsrFailOnWarn: boolean, commonPubPause: boolean, distJsrDirName: string, distJsrBuilder: BundlerName, transpileTarget: transpileTarget, transpileFormat: transpileFormat, transpileSplitting: boolean, transpileMinify: boolean, transpileSourcemap: Sourcemap, transpilePublicPath: string, distJsrAllowDirty: boolean, distJsrSlowTypes: boolean, distNpmOutFilesExt: NpmOutExt, rmDepsMode: ExcludeMode, transpileStub: boolean, transpileWatch: boolean, distJsrGenTsconfig: boolean, coreDeclarations: boolean, config: {
|
|
10
|
-
coreDescription: string;
|
|
11
|
-
coreBuildOutDir: string;
|
|
12
|
-
}): Promise<void>;
|
|
5
|
+
export declare function processRegularFlow(timer: PerfTimer, isDev: boolean, config: BuildPublishConfig): Promise<void>;
|