@livon/cli 0.28.0-rc.4 → 0.29.0-rc.11
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 +4 -2
- package/dist/index.cjs +17 -12
- package/dist/index.js +17 -12
- package/package.json +13 -3
package/README.md
CHANGED
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
[](https://www.npmjs.com/package/@livon/cli)
|
|
7
7
|
[](https://libraries.io/npm/%40livon%2Fcli)
|
|
8
|
-
[](https://github.com/live-input-vector-output-node/livon-ts/actions/workflows/publish.yml)
|
|
9
|
+
[](https://www.bestpractices.dev/projects/12249)
|
|
10
|
+
[](https://snyk.io/test/npm/@livon/cli)
|
|
9
11
|
[](https://www.npmjs.com/package/@livon/cli)
|
|
10
|
-
[](https://www.npmjs.com/package/@livon/cli)
|
|
11
13
|
|
|
12
14
|
## Purpose
|
|
13
15
|
|
package/dist/index.cjs
CHANGED
|
@@ -555,7 +555,6 @@ const createGeneratedPackageManifest = ({ buildResult })=>{
|
|
|
555
555
|
}) : void 0;
|
|
556
556
|
const types = buildResult.dts ? './dist/index.d.ts' : void 0;
|
|
557
557
|
return {
|
|
558
|
-
private: true,
|
|
559
558
|
type: 'module',
|
|
560
559
|
sideEffects: false,
|
|
561
560
|
...main ? {
|
|
@@ -604,6 +603,18 @@ const buildGeneratedClient = async ({ options })=>{
|
|
|
604
603
|
clientFile,
|
|
605
604
|
astFile
|
|
606
605
|
});
|
|
606
|
+
const buildResult = {
|
|
607
|
+
dts: options.build.dts,
|
|
608
|
+
formats: options.build.formats,
|
|
609
|
+
outputPath: external_node_path_default().join(outDir, 'dist')
|
|
610
|
+
};
|
|
611
|
+
await external_node_fs_namespaceObject.promises.mkdir(outDir, {
|
|
612
|
+
recursive: true
|
|
613
|
+
});
|
|
614
|
+
await writeGeneratedPackageManifest({
|
|
615
|
+
packageJsonFile,
|
|
616
|
+
buildResult
|
|
617
|
+
});
|
|
607
618
|
const rslib = await (0, core_namespaceObject.createRslib)({
|
|
608
619
|
cwd: outDir,
|
|
609
620
|
config: {
|
|
@@ -625,15 +636,6 @@ const buildGeneratedClient = async ({ options })=>{
|
|
|
625
636
|
}
|
|
626
637
|
});
|
|
627
638
|
await rslib.build();
|
|
628
|
-
const buildResult = {
|
|
629
|
-
dts: options.build.dts,
|
|
630
|
-
formats: options.build.formats,
|
|
631
|
-
outputPath: external_node_path_default().join(outDir, 'dist')
|
|
632
|
-
};
|
|
633
|
-
await writeGeneratedPackageManifest({
|
|
634
|
-
packageJsonFile,
|
|
635
|
-
buildResult
|
|
636
|
-
});
|
|
637
639
|
return buildResult;
|
|
638
640
|
};
|
|
639
641
|
const readCachedChecksum = async (checksumFile)=>{
|
|
@@ -757,7 +759,7 @@ const run = async ()=>{
|
|
|
757
759
|
commandRuntime = startCommandRuntime(commandRuntimeInput);
|
|
758
760
|
};
|
|
759
761
|
const execute = async ()=>{
|
|
760
|
-
const { checksumFile } = resolveOutputPaths(options.out);
|
|
762
|
+
const { checksumFile, packageJsonFile } = resolveOutputPaths(options.out);
|
|
761
763
|
const cached = await readCachedChecksum(checksumFile);
|
|
762
764
|
const useCachedEtag = !initialSyncPending && cached.generatorHash === CLIENT_GENERATOR_HASH;
|
|
763
765
|
const cachedEtag = useCachedEtag ? cached.etag : void 0;
|
|
@@ -776,7 +778,9 @@ const run = async ()=>{
|
|
|
776
778
|
forceWrite: initialSyncPending
|
|
777
779
|
});
|
|
778
780
|
initialSyncPending = false;
|
|
779
|
-
|
|
781
|
+
const packageManifestMissing = await external_node_fs_namespaceObject.promises.access(packageJsonFile).then(()=>false).catch(()=>true);
|
|
782
|
+
const shouldBuildGeneratedClient = writeResult.updated || packageManifestMissing;
|
|
783
|
+
if (shouldBuildGeneratedClient) {
|
|
780
784
|
const buildResult = await buildGeneratedClient({
|
|
781
785
|
options
|
|
782
786
|
});
|
|
@@ -789,6 +793,7 @@ const run = async ()=>{
|
|
|
789
793
|
details.push(`${writeResult.summary.inputs} inputs`);
|
|
790
794
|
details.push(`${writeResult.summary.outputs} outputs`);
|
|
791
795
|
}
|
|
796
|
+
if (!writeResult.updated && packageManifestMissing) details.push('package manifest emitted');
|
|
792
797
|
details.push(`build ${buildResult.formats.join('+')}${buildResult.dts ? '+dts' : ''}`);
|
|
793
798
|
details.push(`dist ${buildResult.outputPath}`);
|
|
794
799
|
const detailsInfo = details.length > 0 ? `, ${details.join(', ')}` : '';
|
package/dist/index.js
CHANGED
|
@@ -530,7 +530,6 @@ const createGeneratedPackageManifest = ({ buildResult })=>{
|
|
|
530
530
|
}) : void 0;
|
|
531
531
|
const types = buildResult.dts ? './dist/index.d.ts' : void 0;
|
|
532
532
|
return {
|
|
533
|
-
private: true,
|
|
534
533
|
type: 'module',
|
|
535
534
|
sideEffects: false,
|
|
536
535
|
...main ? {
|
|
@@ -579,6 +578,18 @@ const buildGeneratedClient = async ({ options })=>{
|
|
|
579
578
|
clientFile,
|
|
580
579
|
astFile
|
|
581
580
|
});
|
|
581
|
+
const buildResult = {
|
|
582
|
+
dts: options.build.dts,
|
|
583
|
+
formats: options.build.formats,
|
|
584
|
+
outputPath: node_path.join(outDir, 'dist')
|
|
585
|
+
};
|
|
586
|
+
await promises.mkdir(outDir, {
|
|
587
|
+
recursive: true
|
|
588
|
+
});
|
|
589
|
+
await writeGeneratedPackageManifest({
|
|
590
|
+
packageJsonFile,
|
|
591
|
+
buildResult
|
|
592
|
+
});
|
|
582
593
|
const rslib = await createRslib({
|
|
583
594
|
cwd: outDir,
|
|
584
595
|
config: {
|
|
@@ -600,15 +611,6 @@ const buildGeneratedClient = async ({ options })=>{
|
|
|
600
611
|
}
|
|
601
612
|
});
|
|
602
613
|
await rslib.build();
|
|
603
|
-
const buildResult = {
|
|
604
|
-
dts: options.build.dts,
|
|
605
|
-
formats: options.build.formats,
|
|
606
|
-
outputPath: node_path.join(outDir, 'dist')
|
|
607
|
-
};
|
|
608
|
-
await writeGeneratedPackageManifest({
|
|
609
|
-
packageJsonFile,
|
|
610
|
-
buildResult
|
|
611
|
-
});
|
|
612
614
|
return buildResult;
|
|
613
615
|
};
|
|
614
616
|
const readCachedChecksum = async (checksumFile)=>{
|
|
@@ -732,7 +734,7 @@ const run = async ()=>{
|
|
|
732
734
|
commandRuntime = startCommandRuntime(commandRuntimeInput);
|
|
733
735
|
};
|
|
734
736
|
const execute = async ()=>{
|
|
735
|
-
const { checksumFile } = resolveOutputPaths(options.out);
|
|
737
|
+
const { checksumFile, packageJsonFile } = resolveOutputPaths(options.out);
|
|
736
738
|
const cached = await readCachedChecksum(checksumFile);
|
|
737
739
|
const useCachedEtag = !initialSyncPending && cached.generatorHash === CLIENT_GENERATOR_HASH;
|
|
738
740
|
const cachedEtag = useCachedEtag ? cached.etag : void 0;
|
|
@@ -751,7 +753,9 @@ const run = async ()=>{
|
|
|
751
753
|
forceWrite: initialSyncPending
|
|
752
754
|
});
|
|
753
755
|
initialSyncPending = false;
|
|
754
|
-
|
|
756
|
+
const packageManifestMissing = await promises.access(packageJsonFile).then(()=>false).catch(()=>true);
|
|
757
|
+
const shouldBuildGeneratedClient = writeResult.updated || packageManifestMissing;
|
|
758
|
+
if (shouldBuildGeneratedClient) {
|
|
755
759
|
const buildResult = await buildGeneratedClient({
|
|
756
760
|
options
|
|
757
761
|
});
|
|
@@ -764,6 +768,7 @@ const run = async ()=>{
|
|
|
764
768
|
details.push(`${writeResult.summary.inputs} inputs`);
|
|
765
769
|
details.push(`${writeResult.summary.outputs} outputs`);
|
|
766
770
|
}
|
|
771
|
+
if (!writeResult.updated && packageManifestMissing) details.push('package manifest emitted');
|
|
767
772
|
details.push(`build ${buildResult.formats.join('+')}${buildResult.dts ? '+dts' : ''}`);
|
|
768
773
|
details.push(`dist ${buildResult.outputPath}`);
|
|
769
774
|
const detailsInfo = details.length > 0 ? `, ${details.join(', ')}` : '';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livon/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0-rc.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "CLI for LIVON client sync and generated API workflows.",
|
|
@@ -25,6 +25,16 @@
|
|
|
25
25
|
"THIRD_PARTY_NOTICES.md"
|
|
26
26
|
],
|
|
27
27
|
"license": "MIT",
|
|
28
|
+
"author": {
|
|
29
|
+
"name": "LIVON",
|
|
30
|
+
"url": "https://livon.tech"
|
|
31
|
+
},
|
|
32
|
+
"contributors": [
|
|
33
|
+
{
|
|
34
|
+
"name": "cr15p1",
|
|
35
|
+
"url": "https://github.com/cr15p1"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
28
38
|
"repository": {
|
|
29
39
|
"type": "git",
|
|
30
40
|
"url": "git+https://github.com/live-input-vector-output-node/livon-ts.git",
|
|
@@ -37,8 +47,8 @@
|
|
|
37
47
|
"keywords": [
|
|
38
48
|
"livon",
|
|
39
49
|
"cli",
|
|
40
|
-
"sync",
|
|
41
50
|
"codegen",
|
|
51
|
+
"sync",
|
|
42
52
|
"typescript"
|
|
43
53
|
],
|
|
44
54
|
"bin": {
|
|
@@ -46,7 +56,7 @@
|
|
|
46
56
|
},
|
|
47
57
|
"dependencies": {
|
|
48
58
|
"@rslib/core": "0.19.5",
|
|
49
|
-
"@livon/client": "0.
|
|
59
|
+
"@livon/client": "0.29.0-rc.11",
|
|
50
60
|
"msgpackr": "1.11.8",
|
|
51
61
|
"ws": "8.19.0"
|
|
52
62
|
}
|