@junobuild/cli-tools 0.12.0 → 0.12.2-next-2026-03-15
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/dist/node/index.mjs +31 -23
- package/dist/node/index.mjs.map +4 -4
- package/dist/types/commands/prune.d.ts +5 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/services/deploy.prepare.services.d.ts +2 -1
- package/dist/types/services/prune.prepare.services.d.ts +9 -0
- package/dist/types/services/prune.services.d.ts +5 -0
- package/dist/types/types/assets.d.ts +12 -0
- package/dist/types/types/deploy.d.ts +5 -10
- package/dist/types/types/prune.d.ts +16 -0
- package/dist/types/utils/assets.utils.d.ts +4 -0
- package/dist/types/utils/deploy.utils.d.ts +1 -5
- package/dist/types/utils/prune.utils.d.ts +8 -0
- package/package.json +12 -12
package/dist/types/index.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
export * from './commands/build';
|
|
2
2
|
export * from './commands/deploy';
|
|
3
3
|
export * from './commands/generate';
|
|
4
|
+
export * from './commands/prune';
|
|
4
5
|
export * from './commands/publish';
|
|
5
6
|
export * from './constants/deploy.constants';
|
|
7
|
+
export { ListAssets } from './types/assets';
|
|
6
8
|
export type * from './types/deploy';
|
|
7
9
|
export type * from './types/pkg';
|
|
8
10
|
export type * from './types/proposal';
|
|
11
|
+
export type * from './types/prune';
|
|
9
12
|
export type * from './types/publish';
|
|
10
13
|
export * from './utils/args.utils';
|
|
11
14
|
export * from './utils/cmd.utils';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CliConfig } from '@junobuild/config';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ListAssets } from '../types/assets';
|
|
3
|
+
import type { FileDetails, PrepareDeployOptions } from '../types/deploy';
|
|
3
4
|
export declare const prepareDeploy: ({ config, listAssets, assertSourceDirExists, includeAllFiles }: {
|
|
4
5
|
config: CliConfig;
|
|
5
6
|
listAssets: ListAssets;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CliConfig } from '@junobuild/config';
|
|
2
|
+
import type { ListAssets } from '../types/assets';
|
|
3
|
+
import type { PreparePruneOptions, PruneFileStorage } from '../types/prune';
|
|
4
|
+
export declare const preparePrune: ({ config, listAssets, assertSourceDirExists }: {
|
|
5
|
+
config: CliConfig;
|
|
6
|
+
listAssets: ListAssets;
|
|
7
|
+
} & PreparePruneOptions) => Promise<{
|
|
8
|
+
files: PruneFileStorage[];
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CliConfig } from '@junobuild/config';
|
|
2
|
+
import type { Asset } from '@junobuild/storage';
|
|
3
|
+
export interface PrepareAssetsOptions {
|
|
4
|
+
assertSourceDirExists?: (source: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export type ListAssets = ({ startAfter }: {
|
|
7
|
+
startAfter?: string;
|
|
8
|
+
}) => Promise<Asset[]>;
|
|
9
|
+
export interface AssetsParams {
|
|
10
|
+
config: CliConfig;
|
|
11
|
+
listAssets: ListAssets;
|
|
12
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { EncodingType } from '@junobuild/config';
|
|
2
|
+
import type { OnUploadProgress } from '@junobuild/storage';
|
|
3
|
+
import type { AssetsParams, PrepareAssetsOptions } from './assets';
|
|
3
4
|
export type MimeType = string;
|
|
4
5
|
export type FileExtension = string;
|
|
5
6
|
export interface FileDetails {
|
|
@@ -15,9 +16,6 @@ export interface FileAndPaths {
|
|
|
15
16
|
file: FileDetails;
|
|
16
17
|
paths: FilePaths;
|
|
17
18
|
}
|
|
18
|
-
export type ListAssets = ({ startAfter }: {
|
|
19
|
-
startAfter?: string;
|
|
20
|
-
}) => Promise<Asset[]>;
|
|
21
19
|
export interface UploadFileStorage {
|
|
22
20
|
filename: string;
|
|
23
21
|
data: Blob;
|
|
@@ -58,13 +56,10 @@ export type DeployResultWithProposal = {
|
|
|
58
56
|
files: Pick<FileDetails, 'file'>[];
|
|
59
57
|
proposalId: bigint;
|
|
60
58
|
};
|
|
61
|
-
export interface PrepareDeployOptions {
|
|
62
|
-
assertSourceDirExists?: (source: string) => void;
|
|
59
|
+
export interface PrepareDeployOptions extends PrepareAssetsOptions {
|
|
63
60
|
includeAllFiles?: boolean;
|
|
64
61
|
}
|
|
65
|
-
export type DeployParams = PrepareDeployOptions & {
|
|
66
|
-
config: CliConfig;
|
|
67
|
-
listAssets: ListAssets;
|
|
62
|
+
export type DeployParams = PrepareDeployOptions & AssetsParams & {
|
|
68
63
|
assertMemory: () => Promise<void>;
|
|
69
64
|
uploadBatchSize?: number;
|
|
70
65
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AssetsParams, PrepareAssetsOptions } from './assets';
|
|
2
|
+
import type { PrepareDeployOptions } from './deploy';
|
|
3
|
+
export type PreparePruneOptions = PrepareAssetsOptions;
|
|
4
|
+
export type PruneParams = PrepareDeployOptions & AssetsParams;
|
|
5
|
+
export interface PruneFileStorage {
|
|
6
|
+
fullPath: string;
|
|
7
|
+
}
|
|
8
|
+
export type PruneFilesFn = (params: {
|
|
9
|
+
files: PruneFileStorage[];
|
|
10
|
+
}) => Promise<void>;
|
|
11
|
+
export type PruneResult = {
|
|
12
|
+
result: 'pruned';
|
|
13
|
+
files: PruneFileStorage[];
|
|
14
|
+
} | {
|
|
15
|
+
result: 'skipped';
|
|
16
|
+
};
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import type { SatelliteConfig } from '@junobuild/config';
|
|
2
|
-
export declare const
|
|
3
|
-
file: string;
|
|
4
|
-
sourceAbsolutePath: string;
|
|
5
|
-
}) => string;
|
|
6
|
-
export declare const listSourceFiles: ({ sourceAbsolutePath, ignore }: {
|
|
2
|
+
export declare const listSourceFilesForDeploy: ({ sourceAbsolutePath, ignore }: {
|
|
7
3
|
sourceAbsolutePath: string;
|
|
8
4
|
} & Required<Pick<SatelliteConfig, "ignore">>) => string[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SatelliteConfig } from '@junobuild/config';
|
|
2
|
+
/**
|
|
3
|
+
* Scans the local source directory and returns a Set of fullPaths that are present.
|
|
4
|
+
* Throws if the directory cannot be read.
|
|
5
|
+
*/
|
|
6
|
+
export declare const listSourceFilesForPrune: ({ sourceAbsolutePath, ignore }: {
|
|
7
|
+
sourceAbsolutePath: string;
|
|
8
|
+
} & Required<Pick<SatelliteConfig, "ignore">>) => Set<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@junobuild/cli-tools",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2-next-2026-03-15",
|
|
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",
|
|
@@ -46,22 +46,22 @@
|
|
|
46
46
|
],
|
|
47
47
|
"homepage": "https://juno.build",
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@dfinity/utils": "
|
|
50
|
-
"@junobuild/cdn": "
|
|
51
|
-
"@junobuild/config": "
|
|
52
|
-
"@junobuild/functions-tools": "
|
|
53
|
-
"@junobuild/storage": "
|
|
54
|
-
"esbuild": "
|
|
55
|
-
"ora": "
|
|
49
|
+
"@dfinity/utils": "*",
|
|
50
|
+
"@junobuild/cdn": "*",
|
|
51
|
+
"@junobuild/config": "*",
|
|
52
|
+
"@junobuild/functions-tools": "*",
|
|
53
|
+
"@junobuild/storage": "*",
|
|
54
|
+
"esbuild": "*",
|
|
55
|
+
"ora": "*"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"file-type": "^21.
|
|
59
|
-
"listr2": "^
|
|
58
|
+
"file-type": "^21.3.2",
|
|
59
|
+
"listr2": "^10.2.1",
|
|
60
60
|
"mime-types": "^3.0.2",
|
|
61
|
-
"minimatch": "^10.
|
|
61
|
+
"minimatch": "^10.2.4"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@types/mime-types": "^3.0.1",
|
|
65
65
|
"@types/minimatch": "^6.0.0"
|
|
66
66
|
}
|
|
67
|
-
}
|
|
67
|
+
}
|