autoforce 0.1.19 → 0.1.20

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/.autoforce.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.19",
2
+ "version": "0.1.20",
3
3
  "backlogColumn": "Todo",
4
4
  "gitServices": "github",
5
5
  "gitModel": "githubflow",
@@ -1,5 +1,5 @@
1
1
  import { Choice } from "prompts";
2
- import { AnyValue } from "../types/auto.js";
2
+ import { AnyValue, CommandOptions } from "../types/auto.js";
3
3
  export declare const WORKING_FOLDER: string;
4
4
  export declare const CONFIG_FILE: string;
5
5
  export declare const DICTIONARY_FOLDER: string;
@@ -21,7 +21,7 @@ export declare function titlesToChoices(list: string[], titleToValue?: (title: s
21
21
  export declare function findChoicesPosition(choices: Choice[], value: string): number;
22
22
  export declare function getFilesInFolders(folders: string[], filter: (fullPath: string) => boolean, recursive?: boolean, ignoreList?: string[]): string[];
23
23
  export declare function getModelFolders(subfolder: string): string[];
24
- export declare function createConfigurationFile(taskName?: string): Promise<boolean>;
24
+ export declare function createConfigurationFile(taskName?: string, options?: CommandOptions): Promise<boolean>;
25
25
  export declare function getConfigFile(file: string, variable: string, defaultValue: AnyValue): any;
26
26
  export declare function getConfig(variable: string, defaultValue: AnyValue): any;
27
27
  export declare function storeConfig(record: Record<string, AnyValue>): void;
@@ -127,7 +127,6 @@ async function getBaseConfig(config) {
127
127
  if (projectServices.project === undefined)
128
128
  return;
129
129
  config.projectServices = projectServices.project;
130
- ;
131
130
  if (projectServices.project === ProjectServices.GitHub || projectServices.project === ProjectServices.GitLab) {
132
131
  // Gestion del Proyecto
133
132
  const backlogColumn = await prompts([{
@@ -153,9 +152,14 @@ async function getBaseConfig(config) {
153
152
  config.projectId = projectId.projectId;
154
153
  return config;
155
154
  }
156
- export async function createConfigurationFile(taskName) {
157
- const baseConfig = { backlogColumn: context.backlogColumn, devModel: context.devModel, docModel: context.docModel, projectModel: context.projectModel, gitModel: context.gitModel, gitServices: context.gitServices, projectServices: context.projectServices, projectId: context.projectId, listFilter: context.listFilter, listTemplate: context.listTemplate };
158
- let config = taskName ? await getTaskConfig(baseConfig) : await getBaseConfig(baseConfig);
155
+ export async function createConfigurationFile(taskName, options) {
156
+ if (options?.noprompt) {
157
+ delete options.noprompt;
158
+ storeConfig(options);
159
+ return true;
160
+ }
161
+ const baseConfig = { backlogColumn: options?.backlogColumn || context.backlogColumn, devModel: options?.devModel || context.devModel, docModel: options?.docModel || context.docModel, projectModel: options?.projectModel || context.projectModel, gitModel: options?.gitModel || context.gitModel, gitServices: options?.gitServices || context.gitServices, projectServices: options?.projectServices || context.projectServices, projectId: options?.projectId || context.projectId, listFilter: options?.listFilter || context.listFilter, listTemplate: options?.listTemplate || context.listTemplate };
162
+ const config = taskName ? await getTaskConfig(baseConfig) : await getBaseConfig(baseConfig);
159
163
  if (!config)
160
164
  return false;
161
165
  storeConfig(config);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "autoforce",
3
3
  "homepage": "https://sebastianclaros.github.io/autoforce",
4
4
  "private": false,
5
- "version": "0.1.19",
5
+ "version": "0.1.20",
6
6
  "keywords": [
7
7
  "Salesforce",
8
8
  "Automation",