@reliverse/dler 1.7.10 → 1.7.12
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 +216 -10
- package/bin/app/build/cmd.js +11 -2
- package/bin/app/build/impl.d.ts +3 -2
- package/bin/app/build/impl.js +52 -36
- package/bin/app/merge/cmd.d.ts +30 -5
- package/bin/app/merge/cmd.js +586 -258
- package/bin/app/mkdist/cmd.d.ts +0 -4
- package/bin/app/mkdist/cmd.js +0 -4
- package/bin/app/mock/cmd.d.ts +41 -0
- package/bin/app/mock/cmd.js +284 -0
- package/bin/app/mock/mock.d.ts +11 -0
- package/bin/app/mock/mock.js +97 -0
- package/bin/app/pub/cmd.js +10 -1
- package/bin/libs/sdk/sdk-impl/build/build-library.js +22 -20
- package/bin/libs/sdk/sdk-impl/build/build-regular.js +47 -42
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/build.d.ts +4 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/build.js +6 -7
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/mkdist-impl/loaders/sass.js +1 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/mkdist-impl/make.js +1 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/mkdist-impl/utils/dts.js +1 -1
- package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/mkdist-impl/utils/vue-dts.js +1 -1
- package/bin/libs/sdk/sdk-impl/cfg/info.js +1 -1
- package/bin/libs/sdk/sdk-impl/library-flow.js +2 -16
- package/bin/libs/sdk/sdk-impl/pub/pub-library.js +2 -9
- package/bin/libs/sdk/sdk-impl/pub/pub-regular.js +2 -14
- package/bin/libs/sdk/sdk-impl/spell/spell-parser.d.ts +1 -1
- package/bin/libs/sdk/sdk-impl/spell/spell-parser.js +2 -2
- package/bin/libs/sdk/sdk-impl/spell/spell-types.d.ts +27 -1
- package/bin/libs/sdk/sdk-impl/utils/b-exts.d.ts +5 -0
- package/bin/libs/sdk/sdk-impl/utils/b-exts.js +406 -0
- package/bin/libs/sdk/sdk-impl/utils/binary.d.ts +4 -0
- package/bin/libs/sdk/sdk-impl/utils/binary.js +11 -0
- package/bin/libs/sdk/sdk-impl/utils/file-type.d.ts +21 -0
- package/bin/libs/sdk/sdk-impl/utils/file-type.js +78 -0
- package/bin/libs/sdk/sdk-impl/utils/finalize.js +3 -3
- package/bin/libs/sdk/sdk-impl/utils/utils-clean.js +0 -1
- package/bin/libs/sdk/sdk-impl/utils/utils-error.d.ts +3 -2
- package/bin/libs/sdk/sdk-impl/utils/utils-error.js +10 -10
- package/bin/libs/sdk/sdk-impl/utils/utils-fs.d.ts +28 -6
- package/bin/libs/sdk/sdk-impl/utils/utils-fs.js +73 -124
- package/bin/libs/sdk/sdk-impl/utils/utils-jsr-json.js +20 -2
- package/bin/libs/sdk/sdk-impl/utils/utils-security.d.ts +15 -0
- package/bin/libs/sdk/sdk-impl/utils/utils-security.js +102 -0
- package/bin/libs/sdk/sdk-mod.d.ts +3 -3
- package/bin/libs/sdk/sdk-mod.js +3 -2
- package/bin/libs/sdk/sdk-types.d.ts +15 -4
- package/bin/templates/App.css +31 -0
- package/bin/templates/App.tsx +21 -0
- package/bin/templates/DOCS.md +31 -0
- package/bin/templates/globals.css +27 -0
- package/bin/templates/hello/world.ts +1 -0
- package/bin/templates/index.html +12 -0
- package/bin/templates/main.tsx +11 -0
- package/package.json +3 -3
- package/bin/app/conv/README.md +0 -3
- package/bin/app/merge/README.md +0 -125
- package/bin/app/split/README.md +0 -13
- /package/bin/libs/sdk/sdk-impl/utils/{tools/tools-agg.d.ts → tools-agg.d.ts} +0 -0
- /package/bin/libs/sdk/sdk-impl/utils/{tools/tools-agg.js → tools-agg.js} +0 -0
- /package/bin/libs/sdk/sdk-impl/utils/{tools/tools-impl.d.ts → tools-impl.d.ts} +0 -0
- /package/bin/libs/sdk/sdk-impl/utils/{tools/tools-impl.js → tools-impl.js} +0 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> @reliverse/dler (`/ˈdiː.lər/`, dealer) is a flexible, unified, and fully automated bundler for ts/js projects, as well as an npm/jsr publishing tool. dler is not only a bundler, it also tries to serve as the most powerful codemod toolkit for ts/js.
|
|
4
4
|
|
|
5
|
-
[sponsor](https://github.com/sponsors/blefnk) — [discord](https://discord.gg/pb8ukbwpsj) — [
|
|
5
|
+
[sponsor](https://github.com/sponsors/blefnk) — [discord](https://discord.gg/pb8ukbwpsj) — [github](https://github.com/reliverse/dler) — [npm](https://npmjs.com/@reliverse/dler) — [docs](https://docs.reliverse.org/reliverse/dler)
|
|
6
6
|
|
|
7
7
|
## features
|
|
8
8
|
|
|
@@ -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
|
-
- 🔌
|
|
18
|
+
- 🔌 16 built-in helper [dler commands](#-commands) 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
|
|
@@ -119,7 +119,7 @@ bun dev # bun src/cli.ts --dev
|
|
|
119
119
|
|
|
120
120
|
## 🔌 commands
|
|
121
121
|
|
|
122
|
-
dler ships with a flexible command system (prev. plugins) and **
|
|
122
|
+
dler ships with a flexible command system (prev. plugins) and **16 built-in commands** (from [reliverse addons](https://reliverse.org/addons) collection).
|
|
123
123
|
|
|
124
124
|
feel free to create your own commands. commands can be implemented as built-in directly in `src/app/<command>/impl/*` and then imported from `src/app/<command>/cmd.ts`; or implemented in your own library and then imported from `src/app/<command>/cmd.ts`.
|
|
125
125
|
|
|
@@ -127,7 +127,7 @@ if you run just `dler` — it will display a list of commands which you can laun
|
|
|
127
127
|
|
|
128
128
|
## **available commands**
|
|
129
129
|
|
|
130
|
-
[agg](#1-agg) [build](#2-build) [check](#3-check) [conv](#4-conv) [copy](#5-copy) [init](#6-init) [inject](#7-inject) [libs](#8-libs) [merge](#9-merge) [
|
|
130
|
+
[agg](#1-agg) [build](#2-build) [check](#3-check) [conv](#4-conv) [copy](#5-copy) [init](#6-init) [inject](#7-inject) [libs](#8-libs) [merge](#9-merge) [mock](#10-mock) [migrate](#11-migrate) [pub](#12-pub) [rempts](#13-rempts) [rename](#14-rename) [spell](#15-spell) [split](#16-split)
|
|
131
131
|
|
|
132
132
|
### 1. `agg`
|
|
133
133
|
|
|
@@ -340,7 +340,24 @@ libslist: {
|
|
|
340
340
|
|
|
341
341
|
### 9. `merge`
|
|
342
342
|
|
|
343
|
-
merges multiple files into a single file.
|
|
343
|
+
merges multiple files into a single file. The command is built for both CI and interactive use, with support for glob patterns and advanced options.
|
|
344
|
+
|
|
345
|
+
**key features:**
|
|
346
|
+
|
|
347
|
+
- merges text files with optional commented path headers/footers
|
|
348
|
+
- skips binary/media files by default
|
|
349
|
+
- supports both glob patterns and simple paths
|
|
350
|
+
- preserves directory structure when merging to a directory
|
|
351
|
+
- generates source maps for merged output
|
|
352
|
+
- creates and updates templates for mock project structures
|
|
353
|
+
- handles file deduplication
|
|
354
|
+
- supports custom separators and comment styles
|
|
355
|
+
- provides interactive mode with prompts
|
|
356
|
+
- includes backup functionality
|
|
357
|
+
- validates file permissions and sizes
|
|
358
|
+
- enforces output path conflict detection
|
|
359
|
+
|
|
360
|
+
**usage examples:**
|
|
344
361
|
|
|
345
362
|
```bash
|
|
346
363
|
# simple example:
|
|
@@ -348,9 +365,198 @@ bun dler merge --s "src/**/*.ts" --d "dist/merged.ts"
|
|
|
348
365
|
|
|
349
366
|
# advanced example:
|
|
350
367
|
bun dler merge --s ".temp1/packages/*/lib/**/*" --d ".temp2/merged.ts" --sort "mtime" --header "// Header" --footer "// Footer" --dedupe
|
|
368
|
+
|
|
369
|
+
# generate mock template:
|
|
370
|
+
bun dler merge --s "src/templates" --d "templates/my-template.ts" --as-template
|
|
371
|
+
|
|
372
|
+
# update mock template:
|
|
373
|
+
bun dler merge --s "src/templates" --d "templates/my-template.ts" --as-template --update-template REACT_DLER_TEMPLATE
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
**implementation details:**
|
|
377
|
+
|
|
378
|
+
- uses `magic-string` for efficient string manipulation and source map generation
|
|
379
|
+
- leverages `@reliverse/reglob` for glob pattern matching
|
|
380
|
+
- implements concurrent file operations with `p-map`
|
|
381
|
+
- provides file type detection and appropriate comment styles
|
|
382
|
+
- includes safety checks for file sizes and permissions
|
|
383
|
+
- supports template generation with TypeScript type definitions
|
|
384
|
+
- handles both single file and directory output modes
|
|
385
|
+
- implements interactive prompts via `@reliverse/rempts`
|
|
386
|
+
- provides reporting with logging via `@reliverse/relinka`
|
|
387
|
+
|
|
388
|
+
### 10. `mock`
|
|
389
|
+
|
|
390
|
+
bootstraps file structure based on the specified mock template. The command is designed to create project structures from predefined or custom templates, with built-in safety checks and cleanup capabilities.
|
|
391
|
+
|
|
392
|
+
**key features:**
|
|
393
|
+
|
|
394
|
+
- creates project structures from predefined templates (basic, api, react)
|
|
395
|
+
- supports custom template files
|
|
396
|
+
- handles path conflicts with force option
|
|
397
|
+
- provides cleanup functionality
|
|
398
|
+
- includes dry run mode for previewing changes
|
|
399
|
+
- validates file types and content
|
|
400
|
+
- enforces rate limiting for file operations
|
|
401
|
+
- supports custom whitelabel prefixes
|
|
402
|
+
- preserves directory structure
|
|
403
|
+
- handles both text and binary files
|
|
404
|
+
|
|
405
|
+
**usage examples:**
|
|
406
|
+
|
|
407
|
+
```bash
|
|
408
|
+
# use default react template:
|
|
409
|
+
bun dler mock --template react
|
|
410
|
+
|
|
411
|
+
# use custom template file:
|
|
412
|
+
bun dler mock --template-file templates/my-template.ts
|
|
413
|
+
|
|
414
|
+
# preview changes without applying:
|
|
415
|
+
bun dler mock --template react --dry-run
|
|
416
|
+
|
|
417
|
+
# clean up existing mock structure:
|
|
418
|
+
bun dler mock --template react --cleanup
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
**integration with merge command:**
|
|
422
|
+
The mock command works seamlessly with the merge command to create and update templates:
|
|
423
|
+
|
|
424
|
+
1. **create template from existing files:**
|
|
425
|
+
|
|
426
|
+
```bash
|
|
427
|
+
# create a template from your project structure
|
|
428
|
+
bun dler merge --s "src/templates" --d "templates/my-template.ts" --as-template
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
2. **use the template with mock:**
|
|
432
|
+
|
|
433
|
+
```bash
|
|
434
|
+
# use the generated template
|
|
435
|
+
bun dler mock --template-file templates/my-template.ts
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
3. **update existing template:**
|
|
439
|
+
|
|
440
|
+
```bash
|
|
441
|
+
# update a specific template in the file
|
|
442
|
+
bun dler merge --s "src/templates" --d "templates/my-template.ts" --update-template REACT_DLER_TEMPLATE
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
**implementation details:**
|
|
446
|
+
|
|
447
|
+
- uses `jiti` for dynamic template file loading
|
|
448
|
+
- implements template validation and type checking
|
|
449
|
+
- provides detailed error handling and reporting
|
|
450
|
+
- supports multiple template constants in a single file
|
|
451
|
+
- handles file system operations safely with permissions checks
|
|
452
|
+
- includes cleanup of empty directories
|
|
453
|
+
- provides verbose logging option
|
|
454
|
+
- enforces output path conflict detection
|
|
455
|
+
|
|
456
|
+
**programmatic usage:**
|
|
457
|
+
Both merge and mock commands can be used programmatically through the `@reliverse/dler-sdk` package:
|
|
458
|
+
|
|
459
|
+
```typescript
|
|
460
|
+
import { merge, mock } from "@reliverse/dler-sdk";
|
|
461
|
+
|
|
462
|
+
// Merge files programmatically
|
|
463
|
+
await merge({
|
|
464
|
+
source: ["src/**/*.ts"],
|
|
465
|
+
destination: "dist/merged.ts",
|
|
466
|
+
options: {
|
|
467
|
+
sort: "mtime",
|
|
468
|
+
header: "// Header",
|
|
469
|
+
footer: "// Footer",
|
|
470
|
+
dedupe: true,
|
|
471
|
+
sourcemap: true
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
|
|
475
|
+
// Create mock structure programmatically
|
|
476
|
+
await mock({
|
|
477
|
+
template: "react",
|
|
478
|
+
options: {
|
|
479
|
+
templateFile: "templates/my-template.ts",
|
|
480
|
+
cleanup: false,
|
|
481
|
+
dryRun: false,
|
|
482
|
+
verbose: true,
|
|
483
|
+
whitelabel: "MYAPP",
|
|
484
|
+
force: true
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
|
|
488
|
+
// Create and use custom template
|
|
489
|
+
const template = await merge({
|
|
490
|
+
source: ["src/templates"],
|
|
491
|
+
destination: "templates/my-template.ts",
|
|
492
|
+
options: {
|
|
493
|
+
asTemplate: true,
|
|
494
|
+
whitelabel: "MYAPP"
|
|
495
|
+
}
|
|
496
|
+
});
|
|
497
|
+
|
|
498
|
+
await mock({
|
|
499
|
+
template: "custom",
|
|
500
|
+
options: {
|
|
501
|
+
templateFile: "templates/my-template.ts"
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
**sdk types:**
|
|
507
|
+
|
|
508
|
+
```typescript
|
|
509
|
+
// Merge command options
|
|
510
|
+
interface MergeOptions {
|
|
511
|
+
source: string[];
|
|
512
|
+
destination?: string;
|
|
513
|
+
options?: {
|
|
514
|
+
ignore?: string[];
|
|
515
|
+
format?: string;
|
|
516
|
+
stdout?: boolean;
|
|
517
|
+
noPath?: boolean;
|
|
518
|
+
pathAbove?: boolean;
|
|
519
|
+
separator?: string;
|
|
520
|
+
comment?: string;
|
|
521
|
+
forceComment?: boolean;
|
|
522
|
+
batch?: boolean;
|
|
523
|
+
recursive?: boolean;
|
|
524
|
+
preserveStructure?: boolean;
|
|
525
|
+
increment?: boolean;
|
|
526
|
+
concurrency?: number;
|
|
527
|
+
sort?: "name" | "path" | "mtime" | "none";
|
|
528
|
+
dryRun?: boolean;
|
|
529
|
+
backup?: boolean;
|
|
530
|
+
dedupe?: boolean;
|
|
531
|
+
header?: string;
|
|
532
|
+
footer?: string;
|
|
533
|
+
selectFiles?: boolean;
|
|
534
|
+
interactive?: boolean;
|
|
535
|
+
asTemplate?: boolean;
|
|
536
|
+
ctn?: string;
|
|
537
|
+
whitelabel?: string;
|
|
538
|
+
sourcemap?: boolean;
|
|
539
|
+
updateTemplate?: string;
|
|
540
|
+
dev?: boolean;
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
// Mock command options
|
|
545
|
+
interface MockOptions {
|
|
546
|
+
template: string;
|
|
547
|
+
options?: {
|
|
548
|
+
templateFile?: string;
|
|
549
|
+
templateConsts?: string;
|
|
550
|
+
cleanup?: boolean;
|
|
551
|
+
dryRun?: boolean;
|
|
552
|
+
verbose?: boolean;
|
|
553
|
+
whitelabel?: string;
|
|
554
|
+
force?: boolean;
|
|
555
|
+
};
|
|
556
|
+
}
|
|
351
557
|
```
|
|
352
558
|
|
|
353
|
-
###
|
|
559
|
+
### 11. `migrate`
|
|
354
560
|
|
|
355
561
|
helps migrate between different libraries and module resolution strategies. currently supports:
|
|
356
562
|
|
|
@@ -518,7 +724,7 @@ dler relinka --input src/app.ts --from relinkaFunction --to consolaObject
|
|
|
518
724
|
3. review any file system operations that might need manual updates
|
|
519
725
|
4. consider using globby's advanced features like pattern matching and recursive searching
|
|
520
726
|
|
|
521
|
-
###
|
|
727
|
+
### 12. `pub`
|
|
522
728
|
|
|
523
729
|
pub command is separated for its own build-in plugin as well.
|
|
524
730
|
|
|
@@ -537,13 +743,13 @@ bun dler rempts
|
|
|
537
743
|
bun dler rempts --init cmd1 cmd2
|
|
538
744
|
```
|
|
539
745
|
|
|
540
|
-
###
|
|
746
|
+
### 14. `rename`
|
|
541
747
|
|
|
542
748
|
```bash
|
|
543
749
|
bun dler rename ...
|
|
544
750
|
```
|
|
545
751
|
|
|
546
|
-
###
|
|
752
|
+
### 15. `spell`
|
|
547
753
|
|
|
548
754
|
**available spell types:**
|
|
549
755
|
|
|
@@ -612,7 +818,7 @@ files: [] // means all files
|
|
|
612
818
|
|
|
613
819
|
p.s. [see how rse cli uses hooked=true](https://github.com/reliverse/rse/blob/main/src/postbuild.ts)
|
|
614
820
|
|
|
615
|
-
###
|
|
821
|
+
### 16. `split`
|
|
616
822
|
|
|
617
823
|
splits your code/text file into multiple files.
|
|
618
824
|
|
package/bin/app/build/cmd.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { defineArgs, defineCommand } from "@reliverse/rempts";
|
|
2
|
-
import {
|
|
2
|
+
import { dlerPub } from "./impl.js";
|
|
3
3
|
import { ensureDlerConfig } from "../../libs/sdk/sdk-impl/cfg/init.js";
|
|
4
|
+
import { loadConfig } from "../../libs/sdk/sdk-impl/cfg/load.js";
|
|
5
|
+
import { removeDistFolders } from "../../libs/sdk/sdk-mod.js";
|
|
4
6
|
export default defineCommand({
|
|
5
7
|
meta: {
|
|
6
8
|
name: "build",
|
|
@@ -14,6 +16,13 @@ export default defineCommand({
|
|
|
14
16
|
}),
|
|
15
17
|
async run({ args }) {
|
|
16
18
|
await ensureDlerConfig(args.dev);
|
|
17
|
-
await
|
|
19
|
+
const config = await loadConfig();
|
|
20
|
+
await removeDistFolders(
|
|
21
|
+
config.distNpmDirName,
|
|
22
|
+
config.distJsrDirName,
|
|
23
|
+
config.libsDirDist,
|
|
24
|
+
config.libsList
|
|
25
|
+
);
|
|
26
|
+
await dlerPub(args.dev, config);
|
|
18
27
|
}
|
|
19
28
|
});
|
package/bin/app/build/impl.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { DlerConfig } from "../../libs/sdk/sdk-types.js";
|
|
1
2
|
/**
|
|
2
3
|
* Main entry point for the dler build and publish process.
|
|
3
4
|
* Handles building and publishing for both main project and libraries.
|
|
4
5
|
*/
|
|
5
|
-
export declare function dlerBuild(isDev: boolean): Promise<void>;
|
|
6
|
+
export declare function dlerBuild(isDev: boolean, config?: DlerConfig): Promise<void>;
|
|
6
7
|
/**
|
|
7
8
|
* Main entry point for the dler build and publish process.
|
|
8
9
|
* Handles building and publishing for both main project and libraries.
|
|
9
10
|
*/
|
|
10
|
-
export declare function dlerPub(isDev: boolean): Promise<void>;
|
|
11
|
+
export declare function dlerPub(isDev: boolean, config?: DlerConfig): Promise<void>;
|
package/bin/app/build/impl.js
CHANGED
|
@@ -9,75 +9,91 @@ import { removeDistFolders } from "../../libs/sdk/sdk-impl/utils/utils-clean.js"
|
|
|
9
9
|
import { PROJECT_ROOT } from "../../libs/sdk/sdk-impl/utils/utils-consts.js";
|
|
10
10
|
import { handleDlerError } from "../../libs/sdk/sdk-impl/utils/utils-error.js";
|
|
11
11
|
import { createPerfTimer } from "../../libs/sdk/sdk-impl/utils/utils-perf.js";
|
|
12
|
-
export async function dlerBuild(isDev) {
|
|
12
|
+
export async function dlerBuild(isDev, config) {
|
|
13
13
|
const timer = createPerfTimer();
|
|
14
|
+
let effectiveConfig = config;
|
|
14
15
|
try {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
if (!effectiveConfig) {
|
|
17
|
+
effectiveConfig = await loadConfig();
|
|
18
|
+
}
|
|
19
|
+
if (effectiveConfig.logsFreshFile) {
|
|
20
|
+
await fs.remove(path.join(PROJECT_ROOT, effectiveConfig.logsFileName));
|
|
18
21
|
}
|
|
19
22
|
await removeDistFolders(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
effectiveConfig.distNpmDirName,
|
|
24
|
+
effectiveConfig.distJsrDirName,
|
|
25
|
+
effectiveConfig.libsDirDist,
|
|
26
|
+
effectiveConfig.libsList
|
|
24
27
|
);
|
|
25
28
|
try {
|
|
26
29
|
const bumpIsDisabled = await isBumpDisabled();
|
|
27
|
-
if (!bumpIsDisabled && !
|
|
28
|
-
await bumpHandler(
|
|
30
|
+
if (!bumpIsDisabled && !effectiveConfig.commonPubPause) {
|
|
31
|
+
await bumpHandler(
|
|
32
|
+
effectiveConfig.bumpMode,
|
|
33
|
+
false,
|
|
34
|
+
effectiveConfig.bumpFilter,
|
|
35
|
+
effectiveConfig.bumpSet
|
|
36
|
+
);
|
|
29
37
|
await setBumpDisabledValueTo(true);
|
|
30
38
|
}
|
|
31
39
|
} catch {
|
|
32
40
|
throw new Error("[.config/dler.ts] Failed to set bumpDisable to true");
|
|
33
41
|
}
|
|
34
|
-
await processRegularFlow(timer, isDev,
|
|
35
|
-
await processLibraryFlow(timer, isDev,
|
|
42
|
+
await processRegularFlow(timer, isDev, effectiveConfig);
|
|
43
|
+
await processLibraryFlow(timer, isDev, effectiveConfig);
|
|
36
44
|
await finalizeBuildPub(
|
|
37
45
|
timer,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
effectiveConfig.commonPubPause,
|
|
47
|
+
effectiveConfig.libsList,
|
|
48
|
+
effectiveConfig.distNpmDirName,
|
|
49
|
+
effectiveConfig.distJsrDirName,
|
|
50
|
+
effectiveConfig.libsDirDist
|
|
43
51
|
);
|
|
44
52
|
} catch (error) {
|
|
45
|
-
handleDlerError(error
|
|
53
|
+
handleDlerError(error);
|
|
46
54
|
}
|
|
47
55
|
}
|
|
48
|
-
export async function dlerPub(isDev) {
|
|
56
|
+
export async function dlerPub(isDev, config) {
|
|
49
57
|
const timer = createPerfTimer();
|
|
58
|
+
let effectiveConfig = config;
|
|
50
59
|
try {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
60
|
+
if (!effectiveConfig) {
|
|
61
|
+
effectiveConfig = await loadConfig();
|
|
62
|
+
}
|
|
63
|
+
if (effectiveConfig.logsFreshFile) {
|
|
64
|
+
await fs.remove(path.join(PROJECT_ROOT, effectiveConfig.logsFileName));
|
|
54
65
|
}
|
|
55
66
|
await removeDistFolders(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
67
|
+
effectiveConfig.distNpmDirName,
|
|
68
|
+
effectiveConfig.distJsrDirName,
|
|
69
|
+
effectiveConfig.libsDirDist,
|
|
70
|
+
effectiveConfig.libsList
|
|
60
71
|
);
|
|
61
72
|
const bumpIsDisabled = await isBumpDisabled();
|
|
62
|
-
if (!bumpIsDisabled && !
|
|
73
|
+
if (!bumpIsDisabled && !effectiveConfig.commonPubPause) {
|
|
63
74
|
try {
|
|
64
|
-
await bumpHandler(
|
|
75
|
+
await bumpHandler(
|
|
76
|
+
effectiveConfig.bumpMode,
|
|
77
|
+
false,
|
|
78
|
+
effectiveConfig.bumpFilter,
|
|
79
|
+
effectiveConfig.bumpSet
|
|
80
|
+
);
|
|
65
81
|
await setBumpDisabledValueTo(true);
|
|
66
82
|
} catch {
|
|
67
83
|
throw new Error("[.config/dler.ts] Failed to set bumpDisable to true");
|
|
68
84
|
}
|
|
69
85
|
}
|
|
70
|
-
await processRegularFlow(timer, isDev,
|
|
71
|
-
await processLibraryFlow(timer, isDev,
|
|
86
|
+
await processRegularFlow(timer, isDev, effectiveConfig);
|
|
87
|
+
await processLibraryFlow(timer, isDev, effectiveConfig);
|
|
72
88
|
await finalizeBuildPub(
|
|
73
89
|
timer,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
90
|
+
effectiveConfig.commonPubPause,
|
|
91
|
+
effectiveConfig.libsList,
|
|
92
|
+
effectiveConfig.distNpmDirName,
|
|
93
|
+
effectiveConfig.distJsrDirName,
|
|
94
|
+
effectiveConfig.libsDirDist
|
|
79
95
|
);
|
|
80
96
|
} catch (error) {
|
|
81
|
-
handleDlerError(error
|
|
97
|
+
handleDlerError(error);
|
|
82
98
|
}
|
|
83
99
|
}
|
package/bin/app/merge/cmd.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
declare const _default: import("@reliverse/rempts").Command<{
|
|
2
|
+
dev: {
|
|
3
|
+
type: "boolean";
|
|
4
|
+
description: string;
|
|
5
|
+
};
|
|
2
6
|
s: {
|
|
3
7
|
type: "array";
|
|
4
8
|
description: string;
|
|
@@ -58,7 +62,6 @@ declare const _default: import("@reliverse/rempts").Command<{
|
|
|
58
62
|
increment: {
|
|
59
63
|
type: "boolean";
|
|
60
64
|
description: string;
|
|
61
|
-
default: false;
|
|
62
65
|
};
|
|
63
66
|
concurrency: {
|
|
64
67
|
type: "number";
|
|
@@ -73,17 +76,14 @@ declare const _default: import("@reliverse/rempts").Command<{
|
|
|
73
76
|
dryRun: {
|
|
74
77
|
type: "boolean";
|
|
75
78
|
description: string;
|
|
76
|
-
default: false;
|
|
77
79
|
};
|
|
78
80
|
backup: {
|
|
79
81
|
type: "boolean";
|
|
80
82
|
description: string;
|
|
81
|
-
default: false;
|
|
82
83
|
};
|
|
83
84
|
dedupe: {
|
|
84
85
|
type: "boolean";
|
|
85
86
|
description: string;
|
|
86
|
-
default: false;
|
|
87
87
|
};
|
|
88
88
|
header: {
|
|
89
89
|
type: "string";
|
|
@@ -93,10 +93,35 @@ declare const _default: import("@reliverse/rempts").Command<{
|
|
|
93
93
|
type: "string";
|
|
94
94
|
description: string;
|
|
95
95
|
};
|
|
96
|
+
"select-files": {
|
|
97
|
+
type: "boolean";
|
|
98
|
+
description: string;
|
|
99
|
+
};
|
|
96
100
|
interactive: {
|
|
97
101
|
type: "boolean";
|
|
98
102
|
description: string;
|
|
99
|
-
|
|
103
|
+
};
|
|
104
|
+
"as-template": {
|
|
105
|
+
type: "boolean";
|
|
106
|
+
description: string;
|
|
107
|
+
};
|
|
108
|
+
"custom-template-name": {
|
|
109
|
+
type: "string";
|
|
110
|
+
description: string;
|
|
111
|
+
};
|
|
112
|
+
whitelabel: {
|
|
113
|
+
type: "string";
|
|
114
|
+
description: string;
|
|
115
|
+
default: string;
|
|
116
|
+
};
|
|
117
|
+
sourcemap: {
|
|
118
|
+
type: "boolean";
|
|
119
|
+
description: string;
|
|
120
|
+
};
|
|
121
|
+
"update-template": {
|
|
122
|
+
type: "string";
|
|
123
|
+
description: string;
|
|
124
|
+
dependencies: string[];
|
|
100
125
|
};
|
|
101
126
|
}>;
|
|
102
127
|
export default _default;
|