@reliverse/dler 1.4.7 → 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.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 +5 -19
- package/bin/impl.js +0 -219
- /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/{info.d.ts → init/info.d.ts} +0 -0
- /package/bin/{info.js → init/info.js} +0 -0
- /package/bin/{init.d.ts → init/init.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
- 🎯 optimized for speed and modern workflows
|
|
16
16
|
- ✨ packed with powerful features under the hood
|
|
17
17
|
- 🛠️ converts typescript aliases to relative paths
|
|
18
|
-
- 🔌 plugin system with
|
|
18
|
+
- 🔌 plugin system with 14 built-in plugins included
|
|
19
19
|
- 📝 highly configurable flow via a configuration file
|
|
20
20
|
- 🔜 `libraries` plugin —> dler monorepo implementation
|
|
21
21
|
- 🧼 cleans up your internal logs from the build dist
|
|
@@ -52,7 +52,7 @@ ensure git, node.js, and bun/pnpm/yarn/npm are installed. then:
|
|
|
52
52
|
git clone https://github.com/reliverse/dler.git
|
|
53
53
|
cd dler
|
|
54
54
|
bun i
|
|
55
|
-
bun dev # bun src/
|
|
55
|
+
bun dev # bun src/cli.ts --dev
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
### installation
|
|
@@ -117,15 +117,15 @@ bun dev # bun src/dler.ts --dev
|
|
|
117
117
|
dler [build|pub] # if installed globally
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
## 🔌
|
|
120
|
+
## 🔌 plugins
|
|
121
121
|
|
|
122
|
-
dler ships with a flexible
|
|
122
|
+
dler ships with a flexible plugin system (aka plugins) and **14 built-in plugins** (from [reliverse addons](https://reliverse.org/addons) collection).
|
|
123
123
|
|
|
124
|
-
feel free to create your own
|
|
124
|
+
feel free to create your own plugins. plugins can be implemented as built-in directly in `src/app/<plugin>/impl/*` and then imported from `src/app/<plugin>/cmd.ts`; or implemented in your own library and then imported from `src/app/<plugin>/cmd.ts`.
|
|
125
125
|
|
|
126
|
-
if you run just `dler` — it will display a list of
|
|
126
|
+
if you run just `dler` — it will display a list of plugins which you can launch interactively.
|
|
127
127
|
|
|
128
|
-
## **available
|
|
128
|
+
## **available plugins**
|
|
129
129
|
|
|
130
130
|
[agg](#1-agg), [build](#2-build), [conv](#3-conv), [deps](#4-deps), [inject](#5-inject), [libs](#6-libs), [merge](#7-merge), [mono](#8-mono), [pub](#9-pub), [relifso](#10-relifso), [relinka](#11-relinka), [rempts](#12-rempts), [spell](#13-spell), [split](#14-split).
|
|
131
131
|
|
|
@@ -147,7 +147,7 @@ dler agg --input <dir> --out <file> [options]
|
|
|
147
147
|
|
|
148
148
|
```bash
|
|
149
149
|
bun tools:agg # shortcut for:
|
|
150
|
-
bun src/
|
|
150
|
+
bun src/cli.ts tools --dev --tool agg --input src/libs/sdk/sdk-impl --out src/libs/sdk/sdk-mod.ts --recursive --named --strip src/libs/sdk
|
|
151
151
|
```
|
|
152
152
|
|
|
153
153
|
### 2. `build`
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "@reliverse/rempts";
|
|
7
7
|
import { existsSync } from "node:fs";
|
|
8
8
|
import { resolve } from "node:path";
|
|
9
|
-
import { cmdAgg } from "
|
|
9
|
+
import { cmdAgg } from "../cmds.js";
|
|
10
10
|
async function loadConfig() {
|
|
11
11
|
const configPath = resolve(".config/dler.ts");
|
|
12
12
|
if (!existsSync(configPath)) return null;
|
package/bin/app/build/cmd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineArgs, defineCommand } from "@reliverse/rempts";
|
|
2
|
-
import { dlerBuild } from "
|
|
3
|
-
import { ensureDlerConfig } from "../../init.js";
|
|
2
|
+
import { dlerBuild } from "./impl.js";
|
|
3
|
+
import { ensureDlerConfig } from "../../init/init.js";
|
|
4
4
|
export default defineCommand({
|
|
5
5
|
meta: {
|
|
6
6
|
name: "build",
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import {
|
|
2
|
+
bumpHandler,
|
|
3
|
+
isBumpDisabled,
|
|
4
|
+
setBumpDisabledValueTo
|
|
5
|
+
} from "@reliverse/bleump";
|
|
6
|
+
import path from "@reliverse/pathkit";
|
|
7
|
+
import fs from "@reliverse/relifso";
|
|
8
|
+
import { loadConfig } from "../../init/load.js";
|
|
9
|
+
import { processLibraryFlow } from "../../libs/sdk/sdk-impl/library-flow.js";
|
|
10
|
+
import { processRegularFlow } from "../../libs/sdk/sdk-impl/regular-flow.js";
|
|
11
|
+
import { finalizeBuildPub } from "../../libs/sdk/sdk-impl/utils/finalize.js";
|
|
12
|
+
import { removeDistFolders } from "../../libs/sdk/sdk-impl/utils/utils-clean.js";
|
|
13
|
+
import { PROJECT_ROOT } from "../../libs/sdk/sdk-impl/utils/utils-consts.js";
|
|
14
|
+
import { handleDlerError } from "../../libs/sdk/sdk-impl/utils/utils-error.js";
|
|
15
|
+
import { createPerfTimer } from "../../libs/sdk/sdk-impl/utils/utils-perf.js";
|
|
16
|
+
export async function dlerBuild(isDev) {
|
|
17
|
+
const timer = createPerfTimer();
|
|
18
|
+
try {
|
|
19
|
+
const config = await loadConfig();
|
|
20
|
+
if (config.logsFreshFile) {
|
|
21
|
+
await fs.remove(path.join(PROJECT_ROOT, config.logsFileName));
|
|
22
|
+
}
|
|
23
|
+
await removeDistFolders(
|
|
24
|
+
config.distNpmDirName,
|
|
25
|
+
config.distJsrDirName,
|
|
26
|
+
config.libsDirDist,
|
|
27
|
+
config.libsList
|
|
28
|
+
);
|
|
29
|
+
try {
|
|
30
|
+
const bumpIsDisabled = await isBumpDisabled();
|
|
31
|
+
if (!bumpIsDisabled && !config.commonPubPause) {
|
|
32
|
+
await bumpHandler(
|
|
33
|
+
config.bumpMode,
|
|
34
|
+
false,
|
|
35
|
+
config.bumpFilter,
|
|
36
|
+
config.bumpSet
|
|
37
|
+
);
|
|
38
|
+
await setBumpDisabledValueTo(true);
|
|
39
|
+
}
|
|
40
|
+
} catch {
|
|
41
|
+
throw new Error("[.config/dler.ts] Failed to set bumpDisable to true");
|
|
42
|
+
}
|
|
43
|
+
await processRegularFlow(timer, isDev, config);
|
|
44
|
+
await processLibraryFlow(timer, isDev, config);
|
|
45
|
+
await finalizeBuildPub(
|
|
46
|
+
timer,
|
|
47
|
+
config.commonPubPause,
|
|
48
|
+
config.libsList,
|
|
49
|
+
config.distNpmDirName,
|
|
50
|
+
config.distJsrDirName,
|
|
51
|
+
config.libsDirDist
|
|
52
|
+
);
|
|
53
|
+
} catch (error) {
|
|
54
|
+
handleDlerError(error, timer);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export async function dlerPub(isDev) {
|
|
58
|
+
const timer = createPerfTimer();
|
|
59
|
+
try {
|
|
60
|
+
const config = await loadConfig();
|
|
61
|
+
if (config.logsFreshFile) {
|
|
62
|
+
await fs.remove(path.join(PROJECT_ROOT, config.logsFileName));
|
|
63
|
+
}
|
|
64
|
+
await removeDistFolders(
|
|
65
|
+
config.distNpmDirName,
|
|
66
|
+
config.distJsrDirName,
|
|
67
|
+
config.libsDirDist,
|
|
68
|
+
config.libsList
|
|
69
|
+
);
|
|
70
|
+
const bumpIsDisabled = await isBumpDisabled();
|
|
71
|
+
if (!bumpIsDisabled && !config.commonPubPause) {
|
|
72
|
+
try {
|
|
73
|
+
await bumpHandler(
|
|
74
|
+
config.bumpMode,
|
|
75
|
+
false,
|
|
76
|
+
config.bumpFilter,
|
|
77
|
+
config.bumpSet
|
|
78
|
+
);
|
|
79
|
+
await setBumpDisabledValueTo(true);
|
|
80
|
+
} catch {
|
|
81
|
+
throw new Error("[.config/dler.ts] Failed to set bumpDisable to true");
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
await processRegularFlow(timer, isDev, config);
|
|
85
|
+
await processLibraryFlow(timer, isDev, config);
|
|
86
|
+
await finalizeBuildPub(
|
|
87
|
+
timer,
|
|
88
|
+
config.commonPubPause,
|
|
89
|
+
config.libsList,
|
|
90
|
+
config.distNpmDirName,
|
|
91
|
+
config.distJsrDirName,
|
|
92
|
+
config.libsDirDist
|
|
93
|
+
);
|
|
94
|
+
} catch (error) {
|
|
95
|
+
handleDlerError(error, timer);
|
|
96
|
+
}
|
|
97
|
+
}
|
package/bin/app/pub/cmd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineArgs, defineCommand } from "@reliverse/rempts";
|
|
2
|
-
import { dlerPub } from "
|
|
3
|
-
import { ensureDlerConfig } from "../../init.js";
|
|
2
|
+
import { dlerPub } from "../build/impl.js";
|
|
3
|
+
import { ensureDlerConfig } from "../../init/init.js";
|
|
4
4
|
export default defineCommand({
|
|
5
5
|
meta: {
|
|
6
6
|
name: "build",
|
package/bin/{dler.js → cli.js}
RENAMED
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
showUsage,
|
|
8
8
|
runCmd
|
|
9
9
|
} from "@reliverse/rempts";
|
|
10
|
-
import { promptAggCommand } from "./
|
|
10
|
+
import { promptAggCommand } from "./app/agg/run.js";
|
|
11
11
|
import { cmdBuild, cmdPub } from "./app/cmds.js";
|
|
12
|
-
import { showEndPrompt, showStartPrompt } from "./info.js";
|
|
12
|
+
import { showEndPrompt, showStartPrompt } from "./init/info.js";
|
|
13
13
|
const INTERACTIVE_CMDS = ["agg", "build", "pub"];
|
|
14
14
|
const main = defineCommand({
|
|
15
15
|
meta: {
|
|
@@ -2,7 +2,7 @@ import path from "@reliverse/pathkit";
|
|
|
2
2
|
import fs from "@reliverse/relifso";
|
|
3
3
|
import { relinka } from "@reliverse/relinka";
|
|
4
4
|
import { readPackageJSON } from "pkg-types";
|
|
5
|
-
import { DEFAULT_CONFIG } from "
|
|
5
|
+
import { DEFAULT_CONFIG } from "../libs/sdk/default.js";
|
|
6
6
|
const CONFIG_FILENAME = ".config/dler.ts";
|
|
7
7
|
export async function ensureDlerConfig(isDev) {
|
|
8
8
|
const configPath = path.resolve(process.cwd(), CONFIG_FILENAME);
|
|
@@ -46,7 +46,7 @@ function getCoreIsCLI(isDev) {
|
|
|
46
46
|
// },`;
|
|
47
47
|
}
|
|
48
48
|
function generateConfig(isDev, pkgDescription) {
|
|
49
|
-
const importDefineConfigStatement = isDev ? `import { defineConfig } from "
|
|
49
|
+
const importDefineConfigStatement = isDev ? `import { defineConfig } from "../mod.js";` : `import { defineConfig } from "@reliverse/dler";`;
|
|
50
50
|
const verboseValue = getValue(isDev, true, DEFAULT_CONFIG.commonVerbose);
|
|
51
51
|
const coreIsCLI = getCoreIsCLI(isDev);
|
|
52
52
|
const registryValue = getValue(
|
|
@@ -140,8 +140,26 @@ export default defineConfig({
|
|
|
140
140
|
logsFileName: "${DEFAULT_CONFIG.logsFileName}",
|
|
141
141
|
logsFreshFile: ${DEFAULT_CONFIG.logsFreshFile},
|
|
142
142
|
// Dependency filtering
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
// Global is always applied
|
|
144
|
+
removeDepsPatterns: {
|
|
145
|
+
global: [
|
|
146
|
+
"@types",
|
|
147
|
+
"biome",
|
|
148
|
+
"eslint",
|
|
149
|
+
"knip",
|
|
150
|
+
"prettier",
|
|
151
|
+
"typescript",
|
|
152
|
+
"@reliverse/dler",
|
|
153
|
+
],
|
|
154
|
+
"dist-npm": [],
|
|
155
|
+
"dist-jsr": [],
|
|
156
|
+
"dist-libs": {
|
|
157
|
+
"@reliverse/dler-sdk": {
|
|
158
|
+
npm: [],
|
|
159
|
+
jsr: [],
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
},
|
|
145
163
|
// Build setup
|
|
146
164
|
transpileEsbuild: "${DEFAULT_CONFIG.transpileEsbuild}",
|
|
147
165
|
transpileFormat: "${DEFAULT_CONFIG.transpileFormat}",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BuildPublishConfig } from "
|
|
1
|
+
import type { BuildPublishConfig } from "../libs/sdk/sdk-types.js";
|
|
2
2
|
/**
|
|
3
3
|
* Searches for and loads the configuration file `.config/dler.ts`.
|
|
4
4
|
* Falls back to default configuration if the file is not found.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from "@reliverse/relifso";
|
|
2
2
|
import { relinka } from "@reliverse/relinka";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
|
-
import { defineConfig } from "
|
|
4
|
+
import { defineConfig } from "../mod.js";
|
|
5
5
|
const CONFIG_FILENAME = ".config/dler.ts";
|
|
6
6
|
export async function loadConfig() {
|
|
7
7
|
const cwd = process.cwd();
|
|
@@ -34,16 +34,27 @@ export const DEFAULT_CONFIG = {
|
|
|
34
34
|
libsList: {},
|
|
35
35
|
logsFileName: "logs/relinka.log",
|
|
36
36
|
logsFreshFile: true,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
// Dependency filtering
|
|
38
|
+
removeDepsPatterns: {
|
|
39
|
+
global: [
|
|
40
|
+
"@types",
|
|
41
|
+
"biome",
|
|
42
|
+
"eslint",
|
|
43
|
+
"knip",
|
|
44
|
+
"prettier",
|
|
45
|
+
"typescript",
|
|
46
|
+
"@reliverse/dler"
|
|
47
|
+
],
|
|
48
|
+
"dist-npm": [],
|
|
49
|
+
"dist-jsr": [],
|
|
50
|
+
"dist-libs": {
|
|
51
|
+
"@reliverse/dler-sdk": {
|
|
52
|
+
npm: [],
|
|
53
|
+
jsr: []
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
// Build setup
|
|
47
58
|
transpileEsbuild: "es2023",
|
|
48
59
|
transpileFormat: "esm",
|
|
49
60
|
transpileMinify: true,
|
|
@@ -1,29 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
3
|
-
/** Options common to both NPM and JSR build targets */
|
|
4
|
-
type BaseLibBuildOptions = {
|
|
5
|
-
libName: string;
|
|
6
|
-
mainDir: string;
|
|
7
|
-
libMainFile: string;
|
|
8
|
-
isDev: boolean;
|
|
9
|
-
libsList: Record<string, LibConfig>;
|
|
10
|
-
rmDepsMode: ExcludeMode;
|
|
11
|
-
rmDepsPatterns: string[];
|
|
12
|
-
timer: PerfTimer;
|
|
13
|
-
};
|
|
14
|
-
/** Options specific to the transpilation/bundling process */
|
|
15
|
-
type TranspileOptions = {
|
|
16
|
-
transpileTarget: transpileTarget;
|
|
17
|
-
transpileFormat: transpileFormat;
|
|
18
|
-
transpileSplitting: boolean;
|
|
19
|
-
libTranspileMinify: boolean;
|
|
20
|
-
transpileSourcemap: Sourcemap;
|
|
21
|
-
transpilePublicPath: string;
|
|
22
|
-
transpileEsbuild: Esbuild;
|
|
23
|
-
transpileStub: boolean;
|
|
24
|
-
transpileWatch: boolean;
|
|
25
|
-
unifiedBundlerOutExt: NpmOutExt;
|
|
26
|
-
};
|
|
1
|
+
import type { PerfTimer } from "../../sdk-types.js";
|
|
2
|
+
import type { BundlerName, BuildPublishConfig, Esbuild, LibConfig, NpmOutExt, Sourcemap, transpileFormat, transpileTarget } from "../../sdk-types.js";
|
|
27
3
|
/** Options specific to the NPM build target */
|
|
28
4
|
type NpmBuildOptions = {
|
|
29
5
|
npmOutDir: string;
|
|
@@ -37,11 +13,27 @@ type JsrBuildOptions = {
|
|
|
37
13
|
distJsrOutFilesExt: NpmOutExt;
|
|
38
14
|
};
|
|
39
15
|
/** Consolidated options for the main library build function */
|
|
40
|
-
export type LibraryBuildOptions = {
|
|
16
|
+
export type LibraryBuildOptions = BuildPublishConfig & {
|
|
41
17
|
effectivePubRegistry: "npm" | "jsr" | "npm-jsr" | undefined;
|
|
42
18
|
npm?: NpmBuildOptions;
|
|
43
19
|
jsr?: JsrBuildOptions;
|
|
44
|
-
|
|
20
|
+
libName: string;
|
|
21
|
+
mainDir: string;
|
|
22
|
+
libMainFile: string;
|
|
23
|
+
isDev: boolean;
|
|
24
|
+
libsList: Record<string, LibConfig>;
|
|
25
|
+
timer: PerfTimer;
|
|
26
|
+
libTranspileMinify: boolean;
|
|
27
|
+
transpileTarget: transpileTarget;
|
|
28
|
+
transpileFormat: transpileFormat;
|
|
29
|
+
transpileSplitting: boolean;
|
|
30
|
+
transpileSourcemap: Sourcemap;
|
|
31
|
+
transpilePublicPath: string;
|
|
32
|
+
transpileEsbuild: Esbuild;
|
|
33
|
+
transpileStub: boolean;
|
|
34
|
+
transpileWatch: boolean;
|
|
35
|
+
unifiedBundlerOutExt: NpmOutExt;
|
|
36
|
+
};
|
|
45
37
|
/**
|
|
46
38
|
* Main entry point to build a library based on the provided options.
|
|
47
39
|
* Manages pre-build source modifications, orchestrates target builds, and ensures post-build cleanup.
|
|
@@ -33,9 +33,7 @@ import {
|
|
|
33
33
|
createJsrJSON,
|
|
34
34
|
renameTsxFiles
|
|
35
35
|
} from "../utils/utils-jsr-json.js";
|
|
36
|
-
import {
|
|
37
|
-
getElapsedPerfTime
|
|
38
|
-
} from "../utils/utils-perf.js";
|
|
36
|
+
import { getElapsedPerfTime } from "../utils/utils-perf.js";
|
|
39
37
|
import { library_createPackageJSON } from "../utils/utils-pkg-json-libs.js";
|
|
40
38
|
const BIN_DIR_NAME = "bin";
|
|
41
39
|
const REPLACEMENT_MARKER = "// dler-replace-me";
|
|
@@ -267,8 +265,6 @@ async function library_buildDistributionTarget(params) {
|
|
|
267
265
|
timer,
|
|
268
266
|
libMainFile,
|
|
269
267
|
libsList,
|
|
270
|
-
rmDepsMode,
|
|
271
|
-
rmDepsPatterns,
|
|
272
268
|
// Transpile/Bundle Options from `options`
|
|
273
269
|
libTranspileMinify,
|
|
274
270
|
transpileTarget,
|
|
@@ -313,8 +309,7 @@ async function library_buildDistributionTarget(params) {
|
|
|
313
309
|
isJsr,
|
|
314
310
|
libName,
|
|
315
311
|
libsList,
|
|
316
|
-
|
|
317
|
-
rmDepsPatterns,
|
|
312
|
+
config: options,
|
|
318
313
|
unifiedBundlerOutExt,
|
|
319
314
|
distJsrOutFilesExt,
|
|
320
315
|
deleteFiles: isJsr,
|
|
@@ -550,8 +545,7 @@ async function library_performCommonBuildSteps(params) {
|
|
|
550
545
|
isJsr,
|
|
551
546
|
libName,
|
|
552
547
|
libsList,
|
|
553
|
-
|
|
554
|
-
rmDepsPatterns,
|
|
548
|
+
config,
|
|
555
549
|
unifiedBundlerOutExt,
|
|
556
550
|
distJsrOutFilesExt,
|
|
557
551
|
deleteFiles = false,
|
|
@@ -566,18 +560,15 @@ async function library_performCommonBuildSteps(params) {
|
|
|
566
560
|
"verbose",
|
|
567
561
|
`${logPrefix} Performing common steps in ${outputDirRoot}`
|
|
568
562
|
);
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
unifiedBundlerOutExt
|
|
579
|
-
);
|
|
580
|
-
}
|
|
563
|
+
await library_createPackageJSON(
|
|
564
|
+
libName,
|
|
565
|
+
npmOutputDirRoot || outputDirRoot,
|
|
566
|
+
jsrOutputDirRoot || outputDirRoot,
|
|
567
|
+
effectivePubRegistry,
|
|
568
|
+
libsList,
|
|
569
|
+
config,
|
|
570
|
+
unifiedBundlerOutExt
|
|
571
|
+
);
|
|
581
572
|
relinka("verbose", `${logPrefix} Created package.json.`);
|
|
582
573
|
await removeLogInternalCalls(outDirBin);
|
|
583
574
|
if (deleteFiles) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { BundlerName,
|
|
2
|
-
import { type PerfTimer } from "../utils/utils-perf.js";
|
|
1
|
+
import type { BundlerName, NpmOutExt, Sourcemap, transpileFormat, transpileTarget, BuildPublishConfig, PerfTimer } from "../../sdk-types.js";
|
|
3
2
|
/**
|
|
4
3
|
* Builds a regular JSR distribution.
|
|
5
4
|
* - Copies the entire source directory if `distJsrBuilder` = "jsr"
|
|
@@ -8,19 +7,13 @@ import { type PerfTimer } from "../utils/utils-perf.js";
|
|
|
8
7
|
export declare function regular_buildJsrDist(isDev: boolean, isJsr: boolean, coreIsCLI: {
|
|
9
8
|
enabled: boolean;
|
|
10
9
|
scripts: Record<string, string>;
|
|
11
|
-
}, coreEntrySrcDir: string, distJsrDirName: string, distJsrBuilder: BundlerName, coreEntryFile: string, transpileTarget: transpileTarget, transpileFormat: transpileFormat, transpileSplitting: boolean, transpileMinify: boolean, transpileSourcemap: Sourcemap, transpilePublicPath: string, unifiedBundlerOutExt: NpmOutExt,
|
|
12
|
-
coreDescription: string;
|
|
13
|
-
coreBuildOutDir?: string;
|
|
14
|
-
}): Promise<void>;
|
|
10
|
+
}, coreEntrySrcDir: string, distJsrDirName: string, distJsrBuilder: BundlerName, coreEntryFile: string, transpileTarget: transpileTarget, transpileFormat: transpileFormat, transpileSplitting: boolean, transpileMinify: boolean, transpileSourcemap: Sourcemap, transpilePublicPath: string, unifiedBundlerOutExt: NpmOutExt, config: BuildPublishConfig, timer: PerfTimer, transpileStub: boolean, transpileWatch: boolean, distJsrGenTsconfig: boolean, coreDeclarations: boolean): Promise<void>;
|
|
15
11
|
/**
|
|
16
12
|
* Builds a regular NPM distribution.
|
|
17
13
|
* - Copies entire src dir if "jsr"
|
|
18
14
|
* - Otherwise uses Bun or a unified builder
|
|
19
15
|
*/
|
|
20
|
-
export declare function regular_buildNpmDist(isDev: boolean, coreEntrySrcDir: string, distNpmDirName: string, distNpmBuilder: BundlerName, coreEntryFile: string, unifiedBundlerOutExt: NpmOutExt,
|
|
16
|
+
export declare function regular_buildNpmDist(isDev: boolean, coreEntrySrcDir: string, distNpmDirName: string, distNpmBuilder: BundlerName, coreEntryFile: string, unifiedBundlerOutExt: NpmOutExt, config: BuildPublishConfig, coreIsCLI: {
|
|
21
17
|
enabled: boolean;
|
|
22
18
|
scripts: Record<string, string>;
|
|
23
|
-
}, transpileTarget: transpileTarget, transpileFormat: transpileFormat, transpileSplitting: boolean, transpileMinify: boolean, transpileSourcemap: Sourcemap, transpilePublicPath: string, transpileStub: boolean, transpileWatch: boolean, timer: PerfTimer, coreDeclarations: boolean
|
|
24
|
-
coreDescription: string;
|
|
25
|
-
coreBuildOutDir?: string;
|
|
26
|
-
}): Promise<void>;
|
|
19
|
+
}, transpileTarget: transpileTarget, transpileFormat: transpileFormat, transpileSplitting: boolean, transpileMinify: boolean, transpileSourcemap: Sourcemap, transpilePublicPath: string, transpileStub: boolean, transpileWatch: boolean, timer: PerfTimer, coreDeclarations: boolean): Promise<void>;
|