@create-node-app/core 0.5.2 → 0.5.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/dist/index.cjs +69 -2625
- package/dist/index.d.cts +20 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +48 -2627
- package/package.json +4 -3
package/dist/index.d.cts
CHANGED
|
@@ -3,6 +3,25 @@ type TemplateOrExtension = {
|
|
|
3
3
|
ignorePackage?: boolean;
|
|
4
4
|
};
|
|
5
5
|
|
|
6
|
+
type DownloadRepositoryOptions = {
|
|
7
|
+
url?: string;
|
|
8
|
+
target: string;
|
|
9
|
+
cacheDir?: string;
|
|
10
|
+
branch?: string | undefined;
|
|
11
|
+
offline?: boolean;
|
|
12
|
+
targetId?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @param opts options
|
|
16
|
+
* @param opts.url The git repository url.
|
|
17
|
+
* @param opts.targetId The target id. Default is `Buffer.from(`${gitUrl}@${branch}`).toString("base64")`
|
|
18
|
+
* @param opts.target The target folder.
|
|
19
|
+
* @param opts.cacheDir? Default `~/.cache/cna/${name}`, the folder
|
|
20
|
+
* @param opts.branch? Default 'main'. Git branch.
|
|
21
|
+
* @param opts.offline? use cached files, and don't update.
|
|
22
|
+
*/
|
|
23
|
+
declare const downloadRepository: ({ url, offline, target, branch, targetId, cacheDir: optsCacheDir, }: DownloadRepositoryOptions) => Promise<void>;
|
|
24
|
+
|
|
6
25
|
declare const checkNodeVersion: (requiredVersion: string, packageName: string) => void;
|
|
7
26
|
declare const checkForLatestVersion: (packageName: string) => Promise<string | null>;
|
|
8
27
|
declare const printEnvInfo: () => Promise<never>;
|
|
@@ -20,4 +39,4 @@ type CnaOptions = {
|
|
|
20
39
|
type CnaOptionsTransform = (options: CnaOptions) => Promise<CnaOptions>;
|
|
21
40
|
declare const createNodeApp: (programName: string, options: CnaOptions, transformOptions: CnaOptionsTransform) => Promise<void>;
|
|
22
41
|
|
|
23
|
-
export { type CnaOptions, type CnaOptionsTransform, type TemplateOrExtension, checkForLatestVersion, checkNodeVersion, createNodeApp, printEnvInfo };
|
|
42
|
+
export { type CnaOptions, type CnaOptionsTransform, type TemplateOrExtension, checkForLatestVersion, checkNodeVersion, createNodeApp, downloadRepository, printEnvInfo };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,25 @@ type TemplateOrExtension = {
|
|
|
3
3
|
ignorePackage?: boolean;
|
|
4
4
|
};
|
|
5
5
|
|
|
6
|
+
type DownloadRepositoryOptions = {
|
|
7
|
+
url?: string;
|
|
8
|
+
target: string;
|
|
9
|
+
cacheDir?: string;
|
|
10
|
+
branch?: string | undefined;
|
|
11
|
+
offline?: boolean;
|
|
12
|
+
targetId?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @param opts options
|
|
16
|
+
* @param opts.url The git repository url.
|
|
17
|
+
* @param opts.targetId The target id. Default is `Buffer.from(`${gitUrl}@${branch}`).toString("base64")`
|
|
18
|
+
* @param opts.target The target folder.
|
|
19
|
+
* @param opts.cacheDir? Default `~/.cache/cna/${name}`, the folder
|
|
20
|
+
* @param opts.branch? Default 'main'. Git branch.
|
|
21
|
+
* @param opts.offline? use cached files, and don't update.
|
|
22
|
+
*/
|
|
23
|
+
declare const downloadRepository: ({ url, offline, target, branch, targetId, cacheDir: optsCacheDir, }: DownloadRepositoryOptions) => Promise<void>;
|
|
24
|
+
|
|
6
25
|
declare const checkNodeVersion: (requiredVersion: string, packageName: string) => void;
|
|
7
26
|
declare const checkForLatestVersion: (packageName: string) => Promise<string | null>;
|
|
8
27
|
declare const printEnvInfo: () => Promise<never>;
|
|
@@ -20,4 +39,4 @@ type CnaOptions = {
|
|
|
20
39
|
type CnaOptionsTransform = (options: CnaOptions) => Promise<CnaOptions>;
|
|
21
40
|
declare const createNodeApp: (programName: string, options: CnaOptions, transformOptions: CnaOptionsTransform) => Promise<void>;
|
|
22
41
|
|
|
23
|
-
export { type CnaOptions, type CnaOptionsTransform, type TemplateOrExtension, checkForLatestVersion, checkNodeVersion, createNodeApp, printEnvInfo };
|
|
42
|
+
export { type CnaOptions, type CnaOptionsTransform, type TemplateOrExtension, checkForLatestVersion, checkNodeVersion, createNodeApp, downloadRepository, printEnvInfo };
|