@junobuild/cli-tools 0.10.2 → 0.11.1
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.
|
@@ -22,13 +22,12 @@ import type { Message, Metafile, OutputFile } from 'esbuild';
|
|
|
22
22
|
*
|
|
23
23
|
* @throws Will exit the process if `esbuild` is not installed.
|
|
24
24
|
*/
|
|
25
|
-
export declare const buildFunctions: ({ infile,
|
|
25
|
+
export declare const buildFunctions: ({ infile, banner }: {
|
|
26
26
|
infile: string;
|
|
27
|
-
outfile: string;
|
|
28
27
|
banner?: {
|
|
29
28
|
[type: string]: string;
|
|
30
29
|
};
|
|
31
|
-
}) => Promise<
|
|
30
|
+
}) => Promise<EsbuildResult>;
|
|
32
31
|
/**
|
|
33
32
|
* Builds a script using `esbuild` for `juno run`.
|
|
34
33
|
*
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type GenerateFunctionsResult } from '@junobuild/functions-tools';
|
|
2
|
+
import type { Metafile } from 'esbuild';
|
|
3
|
+
export interface GenerateArgs {
|
|
4
|
+
infile: string;
|
|
5
|
+
outfileJs: string;
|
|
6
|
+
outfileRs: string;
|
|
7
|
+
banner?: {
|
|
8
|
+
[type: string]: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface GenerateBuildData {
|
|
12
|
+
version: string;
|
|
13
|
+
output: [string, Metafile['outputs'][0]];
|
|
14
|
+
code: Uint8Array;
|
|
15
|
+
outputPath: string;
|
|
16
|
+
}
|
|
17
|
+
export interface GenerateResultData {
|
|
18
|
+
build: Omit<GenerateBuildData, 'code'>;
|
|
19
|
+
generate: GenerateFunctionsResult;
|
|
20
|
+
}
|
|
21
|
+
export interface GenerateResultError {
|
|
22
|
+
status: 'error';
|
|
23
|
+
warnings?: string[];
|
|
24
|
+
errors: string[];
|
|
25
|
+
}
|
|
26
|
+
export type GenerateResult = {
|
|
27
|
+
status: 'success';
|
|
28
|
+
result: GenerateResultData;
|
|
29
|
+
} | GenerateResultError;
|
|
30
|
+
export type GenerateCodeResult = {
|
|
31
|
+
status: 'success';
|
|
32
|
+
result: Omit<GenerateBuildData, 'outputPath'>;
|
|
33
|
+
} | GenerateResultError;
|
|
34
|
+
export declare const buildAndGenerateFunctions: ({ outfileJs, outfileRs, ...args }: GenerateArgs) => Promise<GenerateResult>;
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@junobuild/cli-tools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "A collection of tools for Juno CLIs and Plugins.",
|
|
5
5
|
"author": "David Dal Busco (https://daviddalbusco.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,7 +48,8 @@
|
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@dfinity/utils": "^4.1",
|
|
50
50
|
"@junobuild/cdn": "^2.3",
|
|
51
|
-
"@junobuild/config": "^2.
|
|
51
|
+
"@junobuild/config": "^2.13",
|
|
52
|
+
"@junobuild/functions-tools": "^0.4.2",
|
|
52
53
|
"@junobuild/storage": "^2.3",
|
|
53
54
|
"esbuild": "^0.27.0",
|
|
54
55
|
"ora": "^9"
|