@reliverse/dler 1.7.3 → 1.7.5
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/LICENSES +16 -0
- package/bin/cli.js +13 -10
- package/bin/libs/sdk/sdk-impl/build/build-library.js +1 -1
- package/bin/libs/sdk/sdk-impl/build/build-regular.js +1 -1
- package/bin/libs/sdk/sdk-impl/cfg/info.js +1 -1
- package/bin/libs/sdk/sdk-impl/utils/{utils-pkg-json-libs.js → utils-package-json-libraries.js} +18 -10
- package/bin/libs/sdk/sdk-impl/utils/{utils-pkg-json-reg.js → utils-package-json-regular.js} +19 -7
- package/bin/libs/sdk/sdk-mod.d.ts +2 -2
- package/bin/libs/sdk/sdk-mod.js +2 -2
- package/package.json +3 -2
- /package/bin/libs/sdk/sdk-impl/utils/{utils-pkg-json-libs.d.ts → utils-package-json-libraries.d.ts} +0 -0
- /package/bin/libs/sdk/sdk-impl/utils/{utils-pkg-json-reg.d.ts → utils-package-json-regular.d.ts} +0 -0
package/LICENSES
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
LICENSES
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
MIT License
|
|
6
|
+
|
|
7
|
+
Copyright (c) Nazar Kornienko (blefnk), Reliverse
|
|
8
|
+
|
|
9
|
+
See LICENSE file for full license text.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
NOTICES
|
|
14
|
+
|
|
15
|
+
Some parts of this project are based on and significantly adapt:
|
|
16
|
+
- https://github.com/unjs/unbuild/tree/a6570a5 – MIT © Pooya Parsa (pi0)
|
package/bin/cli.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { re } from "@reliverse/relico";
|
|
1
2
|
import { relinka } from "@reliverse/relinka";
|
|
2
3
|
import {
|
|
3
4
|
runMain,
|
|
@@ -10,6 +11,7 @@ import {
|
|
|
10
11
|
import { promptAggCommand } from "./app/agg/run.js";
|
|
11
12
|
import { getBuildCmd, getPubCmd, getInitCmd, getRenameCmd } from "./app/cmds.js";
|
|
12
13
|
import { showEndPrompt, showStartPrompt } from "./libs/sdk/sdk-impl/cfg/info.js";
|
|
14
|
+
import { ensureDlerConfig } from "./libs/sdk/sdk-impl/cfg/init.js";
|
|
13
15
|
const INTERACTIVE_CMDS = ["agg", "build", "pub"];
|
|
14
16
|
async function runCmd(cmdPromise, args) {
|
|
15
17
|
const cmd = await cmdPromise;
|
|
@@ -39,6 +41,7 @@ Available interactive commands: ${INTERACTIVE_CMDS.join(", ")}`
|
|
|
39
41
|
async run({ args }) {
|
|
40
42
|
const isDev = args.dev;
|
|
41
43
|
relinka("verbose", `Running in ${isDev ? "dev" : "prod"} mode`);
|
|
44
|
+
await ensureDlerConfig(args.dev);
|
|
42
45
|
const isCI = process.env.CI === "true";
|
|
43
46
|
const isNonInteractive = !process.stdout.isTTY;
|
|
44
47
|
if (isCI || isNonInteractive) {
|
|
@@ -53,21 +56,21 @@ Available interactive commands: ${INTERACTIVE_CMDS.join(", ")}`
|
|
|
53
56
|
const cmdToRun = await selectPrompt({
|
|
54
57
|
title: "Select a command to run",
|
|
55
58
|
options: [
|
|
56
|
-
{ value: "
|
|
57
|
-
{ value: "
|
|
58
|
-
{ value: "
|
|
59
|
-
{
|
|
60
|
-
{
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
},
|
|
59
|
+
{ value: "build", label: "build project" },
|
|
60
|
+
{ value: "pub", label: "publish project" },
|
|
61
|
+
{ value: "agg", label: "aggregate files" },
|
|
62
|
+
{ separator: true },
|
|
63
|
+
{ value: "utils", label: re.bold("UTILS"), disabled: true },
|
|
64
|
+
{ separator: true },
|
|
65
|
+
{ value: "copy", label: "copy files" },
|
|
66
|
+
{ value: "init", label: "init files" },
|
|
64
67
|
{
|
|
65
68
|
value: "rename-prepare",
|
|
66
|
-
label: "
|
|
69
|
+
label: "[experimental] my project is a bootstrapper cli (apply rename optimizations)"
|
|
67
70
|
},
|
|
68
71
|
{
|
|
69
72
|
value: "rename-prepare-revert",
|
|
70
|
-
label: "
|
|
73
|
+
label: "[experimental] revert rename cli files optimizations"
|
|
71
74
|
}
|
|
72
75
|
]
|
|
73
76
|
});
|
|
@@ -32,8 +32,8 @@ import {
|
|
|
32
32
|
createJsrJSON,
|
|
33
33
|
renameTsxFiles
|
|
34
34
|
} from "../utils/utils-jsr-json.js";
|
|
35
|
+
import { library_createPackageJSON } from "../utils/utils-package-json-libraries.js";
|
|
35
36
|
import { getElapsedPerfTime } from "../utils/utils-perf.js";
|
|
36
|
-
import { library_createPackageJSON } from "../utils/utils-pkg-json-libs.js";
|
|
37
37
|
const BIN_DIR_NAME = "bin";
|
|
38
38
|
const REPLACEMENT_MARKER = "// dler-replace-me";
|
|
39
39
|
const TYPES_REPLACEMENT_PATH = "src/types.ts";
|
|
@@ -25,8 +25,8 @@ import {
|
|
|
25
25
|
createJsrJSON,
|
|
26
26
|
renameTsxFiles
|
|
27
27
|
} from "../utils/utils-jsr-json.js";
|
|
28
|
+
import { regular_createPackageJSON } from "../utils/utils-package-json-regular.js";
|
|
28
29
|
import { getElapsedPerfTime } from "../utils/utils-perf.js";
|
|
29
|
-
import { regular_createPackageJSON } from "../utils/utils-pkg-json-reg.js";
|
|
30
30
|
const ALIAS_PREFIX_TO_CONVERT = "~";
|
|
31
31
|
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) {
|
|
32
32
|
const outDirRoot = path.join(process.cwd(), distJsrDirName);
|
package/bin/libs/sdk/sdk-impl/utils/{utils-pkg-json-libs.js → utils-package-json-libraries.js}
RENAMED
|
@@ -271,11 +271,15 @@ async function library_writeJsrPackageJSON(libName, outDirBin, pkgJsonDir, origi
|
|
|
271
271
|
exports: {
|
|
272
272
|
".": `./bin/${path.basename(libsList[libName].libMainFile)}`
|
|
273
273
|
},
|
|
274
|
-
files:
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
274
|
+
files: [
|
|
275
|
+
.../* @__PURE__ */ new Set([
|
|
276
|
+
"bin",
|
|
277
|
+
...config.publishArtifacts?.global || [
|
|
278
|
+
"package.json",
|
|
279
|
+
"README.md",
|
|
280
|
+
"LICENSE"
|
|
281
|
+
]
|
|
282
|
+
])
|
|
279
283
|
],
|
|
280
284
|
main: `./bin/${path.basename(libsList[libName].libMainFile)}`,
|
|
281
285
|
module: `./bin/${path.basename(libsList[libName].libMainFile)}`
|
|
@@ -323,11 +327,15 @@ async function library_writeNpmLibPackageJSON(libName, outDirBin, pkgJsonDir, or
|
|
|
323
327
|
exports: {
|
|
324
328
|
".": `./bin/${path.basename(libsList[libName].libMainFile).replace(/\.ts$/, `.${unifiedBundlerOutExt}`)}`
|
|
325
329
|
},
|
|
326
|
-
files:
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
330
|
+
files: [
|
|
331
|
+
.../* @__PURE__ */ new Set([
|
|
332
|
+
"bin",
|
|
333
|
+
...config.publishArtifacts?.global || [
|
|
334
|
+
"package.json",
|
|
335
|
+
"README.md",
|
|
336
|
+
"LICENSE"
|
|
337
|
+
]
|
|
338
|
+
])
|
|
331
339
|
],
|
|
332
340
|
main: `./bin/${path.basename(libsList[libName].libMainFile).replace(/\.ts$/, `.${unifiedBundlerOutExt}`)}`,
|
|
333
341
|
module: `./bin/${path.basename(libsList[libName].libMainFile).replace(/\.ts$/, `.${unifiedBundlerOutExt}`)}`,
|
|
@@ -55,7 +55,17 @@ export async function regular_createPackageJSON(outDirRoot, isJsr, coreIsCLI, un
|
|
|
55
55
|
),
|
|
56
56
|
exports: {
|
|
57
57
|
".": `./${coreBuildOutDir}/${config.coreEntryFile}`
|
|
58
|
-
}
|
|
58
|
+
},
|
|
59
|
+
files: [
|
|
60
|
+
.../* @__PURE__ */ new Set([
|
|
61
|
+
coreBuildOutDir,
|
|
62
|
+
...config.publishArtifacts?.global || [
|
|
63
|
+
"package.json",
|
|
64
|
+
"README.md",
|
|
65
|
+
"LICENSE"
|
|
66
|
+
]
|
|
67
|
+
])
|
|
68
|
+
]
|
|
59
69
|
});
|
|
60
70
|
await fs.writeJSON(path.join(outDirRoot, "package.json"), jsrPkg, {
|
|
61
71
|
spaces: 2
|
|
@@ -99,12 +109,14 @@ export async function regular_createPackageJSON(outDirRoot, isJsr, coreIsCLI, un
|
|
|
99
109
|
".": `./${coreBuildOutDir}/${config.coreEntryFile.replace(/\.ts$/, `.${outExt}`)}`
|
|
100
110
|
},
|
|
101
111
|
files: [
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
112
|
+
.../* @__PURE__ */ new Set([
|
|
113
|
+
coreBuildOutDir,
|
|
114
|
+
...config.publishArtifacts?.global || [
|
|
115
|
+
"package.json",
|
|
116
|
+
"README.md",
|
|
117
|
+
"LICENSE"
|
|
118
|
+
]
|
|
119
|
+
])
|
|
108
120
|
],
|
|
109
121
|
main: `./${coreBuildOutDir}/${config.coreEntryFile.replace(/\.ts$/, `.${outExt}`)}`,
|
|
110
122
|
module: `./${coreBuildOutDir}/${config.coreEntryFile.replace(/\.ts$/, `.${outExt}`)}`,
|
|
@@ -41,7 +41,7 @@ export { finalizeBuildPub } from "./sdk-impl/utils/finalize";
|
|
|
41
41
|
export { createJsrJSON, renameTsxFiles, } from "./sdk-impl/utils/utils-jsr-json";
|
|
42
42
|
export { extractPackageName } from "./sdk-impl/utils/utils-misc";
|
|
43
43
|
export { createPerfTimer, getElapsedPerfTime, pausePerfTimer, resumePerfTimer, } from "./sdk-impl/utils/utils-perf";
|
|
44
|
-
export { library_createPackageJSON } from "./sdk-impl/utils/utils-
|
|
45
|
-
export { regular_createPackageJSON } from "./sdk-impl/utils/utils-
|
|
44
|
+
export { library_createPackageJSON } from "./sdk-impl/utils/utils-package-json-libraries";
|
|
45
|
+
export { regular_createPackageJSON } from "./sdk-impl/utils/utils-package-json-regular";
|
|
46
46
|
export { createTSConfig } from "./sdk-impl/utils/utils-tsconfig";
|
|
47
47
|
export type { CopyHooks, MkdistHooks, RollupBuildEntry, RollupBuildOptions, RollupHooks, UntypedHooks, UntypedOutput, BaseBuildEntry, BuildHooks, } from "./sdk-types";
|
package/bin/libs/sdk/sdk-mod.js
CHANGED
|
@@ -131,6 +131,6 @@ export {
|
|
|
131
131
|
pausePerfTimer,
|
|
132
132
|
resumePerfTimer
|
|
133
133
|
} from "./sdk-impl/utils/utils-perf.js";
|
|
134
|
-
export { library_createPackageJSON } from "./sdk-impl/utils/utils-
|
|
135
|
-
export { regular_createPackageJSON } from "./sdk-impl/utils/utils-
|
|
134
|
+
export { library_createPackageJSON } from "./sdk-impl/utils/utils-package-json-libraries.js";
|
|
135
|
+
export { regular_createPackageJSON } from "./sdk-impl/utils/utils-package-json-regular.js";
|
|
136
136
|
export { createTSConfig } from "./sdk-impl/utils/utils-tsconfig.js";
|
package/package.json
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"license": "MIT",
|
|
40
40
|
"name": "@reliverse/dler",
|
|
41
41
|
"type": "module",
|
|
42
|
-
"version": "1.7.
|
|
42
|
+
"version": "1.7.5",
|
|
43
43
|
"keywords": [
|
|
44
44
|
"reliverse",
|
|
45
45
|
"cli",
|
|
@@ -66,7 +66,8 @@
|
|
|
66
66
|
"bin",
|
|
67
67
|
"package.json",
|
|
68
68
|
"README.md",
|
|
69
|
-
"LICENSE"
|
|
69
|
+
"LICENSE",
|
|
70
|
+
"LICENSES"
|
|
70
71
|
],
|
|
71
72
|
"main": "./bin/mod.js",
|
|
72
73
|
"module": "./bin/mod.js",
|
/package/bin/libs/sdk/sdk-impl/utils/{utils-pkg-json-libs.d.ts → utils-package-json-libraries.d.ts}
RENAMED
|
File without changes
|
/package/bin/libs/sdk/sdk-impl/utils/{utils-pkg-json-reg.d.ts → utils-package-json-regular.d.ts}
RENAMED
|
File without changes
|