@pega/dx-component-builder-sdk 0.1.20 → 0.1.21
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/package.json +1 -1
- package/src/tasks/build-all/helper.js +1 -6
- package/src/tasks/create/index.js +2 -3
- package/src/tasks/delete/helper.js +1 -4
- package/src/tasks/delete/index.js +0 -2
- package/src/tasks/delete-all/helper.js +1 -4
- package/src/tasks/delete-all/index.js +0 -2
- package/src/tasks/generate-missing-companions/index.js +1 -3
- package/src/tasks/list/helper.js +1 -1
- package/src/tasks/list/index.js +0 -1
- package/src/tasks/map-all/helper.js +0 -8
- package/src/tasks/map-all/index.js +0 -4
- package/src/tasks/override/index.js +3 -8
- package/src/tasks/publish/helper.js +6 -3
- package/src/tasks/publish/index.js +5 -1
- package/src/tasks/publish-all/helper.js +7 -4
- package/src/tasks/publish-all/index.js +5 -1
- package/src/tasks/validator/index.js +1 -3
- package/src/util.js +0 -15
package/package.json
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import https from 'https';
|
|
4
3
|
|
|
5
|
-
import fetch from 'node-fetch';
|
|
6
4
|
import AdmZip from 'adm-zip';
|
|
7
5
|
import chalk from 'chalk';
|
|
8
6
|
|
|
9
7
|
import {
|
|
10
|
-
constructCompleteUrl,
|
|
11
8
|
getComponentDirectoryPath,
|
|
12
|
-
getComponents,
|
|
13
9
|
getComponentsObj,
|
|
14
10
|
getPegaServerConfig,
|
|
15
|
-
validateRulesetVersion,
|
|
16
11
|
getOptionsCategory,
|
|
17
12
|
} from '../../util.js';
|
|
18
|
-
import {
|
|
13
|
+
import { COMPONENT_SCHEMA, CATEGORY_CUSTOM } from '../../constants.js';
|
|
19
14
|
|
|
20
15
|
|
|
21
16
|
export const getBuildCategory = async (options) => {
|
|
@@ -8,13 +8,12 @@ import inquirer from 'inquirer';
|
|
|
8
8
|
import ncp from 'ncp';
|
|
9
9
|
import chalk from 'chalk';
|
|
10
10
|
|
|
11
|
-
import { checkPathAccess,
|
|
11
|
+
import { checkPathAccess, showVersion } from '../../util.js';
|
|
12
12
|
import { CATEGORY_CONSTELLATION,
|
|
13
13
|
SDK_CONFIG_JSON_FILENAME,
|
|
14
14
|
DXCB_CONFIG,
|
|
15
15
|
DXCB_COMPONENT_DEFAULTS,
|
|
16
|
-
CUSTOM_TEMPLATE_PATH
|
|
17
|
-
OVERRIDE_TEMPLATE_PATH } from '../../constants.js';
|
|
16
|
+
CUSTOM_TEMPLATE_PATH } from '../../constants.js';
|
|
18
17
|
|
|
19
18
|
|
|
20
19
|
|
|
@@ -5,13 +5,10 @@ import ora from 'ora';
|
|
|
5
5
|
|
|
6
6
|
import { LIST_COMPONENT_SERVICE_REST_ENDPOINT, COMPONENT_SCHEMA, CATEGORY_CONSTELLATION, CATEGORY_CUSTOM, CATEGORY_OVERRIDE } from '../../constants.js';
|
|
7
7
|
import {
|
|
8
|
-
constructCompleteUrl,
|
|
9
8
|
deleteLocalComponent,
|
|
10
9
|
deleteServerComponent,
|
|
11
10
|
getComponentsObj,
|
|
12
|
-
getPegaServerConfig
|
|
13
|
-
nodeFetch,
|
|
14
|
-
getOptionsCategory
|
|
11
|
+
getPegaServerConfig
|
|
15
12
|
} from '../../util.js';
|
|
16
13
|
import { getComponentsFromServer } from '../list/helper.js';
|
|
17
14
|
|
|
@@ -2,16 +2,13 @@ import chalk from 'chalk';
|
|
|
2
2
|
import inquirer from 'inquirer';
|
|
3
3
|
import ora from 'ora';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { COMPONENT_SCHEMA, CATEGORY_CONSTELLATION, CATEGORY_CUSTOM, CATEGORY_OVERRIDE } from '../..//constants.js';
|
|
6
6
|
import {
|
|
7
|
-
constructCompleteUrl,
|
|
8
7
|
deleteLocalComponent,
|
|
9
8
|
deleteServerComponent,
|
|
10
|
-
getComponents,
|
|
11
9
|
getComponentsObj,
|
|
12
10
|
getPegaServerConfig,
|
|
13
11
|
validateRulesetVersion,
|
|
14
|
-
nodeFetch,
|
|
15
12
|
getOptionsCategory
|
|
16
13
|
} from '../../util.js';
|
|
17
14
|
import { getComponentsFromServer } from '../list/helper.js';
|
|
@@ -5,12 +5,10 @@ import chalk from 'chalk';
|
|
|
5
5
|
import { validateCompile } from '../create/index.js';
|
|
6
6
|
import {
|
|
7
7
|
showVersion,
|
|
8
|
-
getComponents,
|
|
9
|
-
getComponentsObj,
|
|
10
8
|
getComponentDirectoryPath,
|
|
11
9
|
getComponentsAndSubDirectory
|
|
12
10
|
} from '../../util.js';
|
|
13
|
-
import {CATEGORY_CONSTELLATION, CATEGORY_CUSTOM
|
|
11
|
+
import {CATEGORY_CONSTELLATION, CATEGORY_CUSTOM } from '../..//constants.js';
|
|
14
12
|
import { or } from 'ajv/dist/compile/codegen/index.js';
|
|
15
13
|
|
|
16
14
|
export const DXCB_CONFIG_INTERNAL_JSON_FILENAME = 'src/dxcb.config.json';
|
package/src/tasks/list/helper.js
CHANGED
|
@@ -5,7 +5,7 @@ import chalk from 'chalk';
|
|
|
5
5
|
import fetch from 'node-fetch';
|
|
6
6
|
|
|
7
7
|
import { LIST_COMPONENT_SERVICE_REST_ENDPOINT, TOKEN_PATH, COMPONENT_SCHEMA, CATEGORY_CUSTOM } from '../../constants.js';
|
|
8
|
-
import { constructCompleteUrl, getComponents, getPegaServerConfig
|
|
8
|
+
import { constructCompleteUrl, getComponents, getPegaServerConfig } from '../../util.js';
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
export const SOURCE_OF_COMPONENT_TYPES = {
|
package/src/tasks/list/index.js
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import https from 'https';
|
|
4
|
-
|
|
5
|
-
import fetch from 'node-fetch';
|
|
6
|
-
import AdmZip from 'adm-zip';
|
|
7
|
-
import chalk from 'chalk';
|
|
8
1
|
|
|
9
2
|
import {
|
|
10
|
-
getComponentDirectoryPath,
|
|
11
3
|
getOptionsCategory
|
|
12
4
|
} from '../../util.js';
|
|
13
5
|
import { COMPONENT_SCHEMA, CATEGORY_CONSTELLATION, CATEGORY_CUSTOM } from '../../constants.js';
|
|
@@ -2,12 +2,8 @@ import inquirer from 'inquirer';
|
|
|
2
2
|
import Listr from 'listr';
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
|
|
5
|
-
import validate from '../validator/index.js';
|
|
6
5
|
import { showVersion, getOptionsCategory, getComponentsObj } from '../../util.js';
|
|
7
6
|
import { updateComponentMap } from '../map/map.js';
|
|
8
|
-
import { CATEGORY_CUSTOM } from '../../constants.js';
|
|
9
|
-
|
|
10
|
-
|
|
11
7
|
import { getBuildCategory } from './helper.js';
|
|
12
8
|
|
|
13
9
|
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
|
-
import { URL, fileURLToPath } from 'url';
|
|
3
2
|
import fs from 'fs';
|
|
4
3
|
import { promisify } from 'util';
|
|
5
|
-
import { createRequire } from "module";
|
|
6
4
|
import { join } from 'path';
|
|
7
5
|
|
|
8
6
|
import inquirer from 'inquirer';
|
|
@@ -10,16 +8,13 @@ import ncp from 'ncp';
|
|
|
10
8
|
import chalk from 'chalk';
|
|
11
9
|
import { updateComponentMap } from '../map/map.js';
|
|
12
10
|
|
|
13
|
-
import { checkPathAccess,
|
|
11
|
+
import { checkPathAccess, showVersion, getPegaConfig } from '../../util.js';
|
|
14
12
|
import {
|
|
15
|
-
convertIntoPascalCase,
|
|
16
|
-
compileMustacheTemplate,
|
|
17
13
|
getComponentDirectoryPath,
|
|
18
14
|
getComponents,
|
|
19
|
-
getComponentDefaults
|
|
20
|
-
sanitize,
|
|
21
|
-
validateSemver
|
|
15
|
+
getComponentDefaults
|
|
22
16
|
} from '../../util.js';
|
|
17
|
+
|
|
23
18
|
import { COMPONENT_SCHEMA,
|
|
24
19
|
CATEGORY_OVERRIDE,
|
|
25
20
|
SDK_CONFIG_JSON_FILENAME,
|
|
@@ -9,14 +9,17 @@ import chalk from 'chalk';
|
|
|
9
9
|
import {
|
|
10
10
|
constructCompleteUrl,
|
|
11
11
|
getComponentDirectoryPath,
|
|
12
|
-
getComponents,
|
|
13
12
|
getComponentsObj,
|
|
14
|
-
getComponentsAndSubDirectory,
|
|
15
13
|
getPegaServerConfig,
|
|
16
14
|
validateRulesetVersion,
|
|
17
15
|
getOptionsCategory
|
|
18
16
|
} from '../../util.js';
|
|
19
|
-
|
|
17
|
+
|
|
18
|
+
import { PUBLISH_COMPONENT_SERVICE_REST_ENDPOINT,
|
|
19
|
+
TOKEN_PATH,
|
|
20
|
+
COMPONENT_SCHEMA,
|
|
21
|
+
CATEGORY_CONSTELLATION,
|
|
22
|
+
CATEGORY_CUSTOM } from '../../constants.js';
|
|
20
23
|
|
|
21
24
|
|
|
22
25
|
export const mapConfigJsonToCompanion = async ( componentKey ) => {
|
|
@@ -10,7 +10,11 @@ import { lintComponent } from '../linter/index.js';
|
|
|
10
10
|
import { CATEGORY_CONSTELLATION, CATEGORY_CUSTOM } from '../../constants.js';
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
import { getPublishComponentQuestions,
|
|
13
|
+
import { getPublishComponentQuestions,
|
|
14
|
+
publishComponentToServer,
|
|
15
|
+
zipComponent,
|
|
16
|
+
getBuildCategory,
|
|
17
|
+
mapConfigJsonToCompanion } from './helper.js';
|
|
14
18
|
|
|
15
19
|
|
|
16
20
|
export default async options => {
|
|
@@ -9,14 +9,17 @@ import chalk from 'chalk';
|
|
|
9
9
|
import {
|
|
10
10
|
constructCompleteUrl,
|
|
11
11
|
getComponentDirectoryPath,
|
|
12
|
-
getComponents,
|
|
13
12
|
getComponentsObj,
|
|
14
|
-
getComponentsAndSubDirectory,
|
|
15
|
-
getPegaServerConfig,
|
|
16
13
|
validateRulesetVersion,
|
|
14
|
+
getPegaServerConfig,
|
|
17
15
|
getOptionsCategory
|
|
18
16
|
} from '../../util.js';
|
|
19
|
-
|
|
17
|
+
|
|
18
|
+
import { PUBLISH_COMPONENT_SERVICE_REST_ENDPOINT,
|
|
19
|
+
TOKEN_PATH,
|
|
20
|
+
COMPONENT_SCHEMA,
|
|
21
|
+
CATEGORY_CONSTELLATION,
|
|
22
|
+
CATEGORY_CUSTOM } from '../../constants.js';
|
|
20
23
|
|
|
21
24
|
|
|
22
25
|
export const mapConfigJsonToCompanion = async ( componentKey ) => {
|
|
@@ -10,7 +10,11 @@ import { lintComponent } from '../linter/index.js';
|
|
|
10
10
|
import { CATEGORY_CONSTELLATION, CATEGORY_CUSTOM } from '../../constants.js';
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
import { getPublishComponentQuestions,
|
|
13
|
+
import { getPublishComponentQuestions,
|
|
14
|
+
publishComponentToServer,
|
|
15
|
+
zipComponent,
|
|
16
|
+
getBuildCategory,
|
|
17
|
+
mapConfigJsonToCompanion } from './helper.js';
|
|
14
18
|
|
|
15
19
|
|
|
16
20
|
|
|
@@ -7,11 +7,9 @@ import Ajv from 'ajv';
|
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
COMPONENT_SCHEMA,
|
|
10
|
-
COMPONENT_PREFIX_FIELD_PATH,
|
|
11
|
-
COMPONENT_PREFIX_TEMPLATE_PATH,
|
|
12
|
-
COMPONENT_PREFIX_WIDGET_PATH,
|
|
13
10
|
CATEGORY_CUSTOM,
|
|
14
11
|
CATEGORY_OVERRIDE } from '../../constants.js';
|
|
12
|
+
|
|
15
13
|
import {
|
|
16
14
|
getComponentDirectoryPath,
|
|
17
15
|
getComponents,
|
package/src/util.js
CHANGED
|
@@ -4,7 +4,6 @@ import { promisify } from 'util';
|
|
|
4
4
|
import https from 'https';
|
|
5
5
|
import inquirer from 'inquirer';
|
|
6
6
|
import { createRequire } from "module";
|
|
7
|
-
import { URL, fileURLToPath } from 'url';
|
|
8
7
|
|
|
9
8
|
import chalk from 'chalk';
|
|
10
9
|
import mustache from 'mustache';
|
|
@@ -271,20 +270,6 @@ export const getDirectoryFiles = async (directory) => {
|
|
|
271
270
|
.map(dirent => dirent.name);
|
|
272
271
|
}
|
|
273
272
|
|
|
274
|
-
/*
|
|
275
|
-
export const createBlankConfigExt = async (directory, name) => {
|
|
276
|
-
|
|
277
|
-
let fileData = "{";
|
|
278
|
-
fileData = fileData.concat("\n\t");
|
|
279
|
-
fileData = fileData.concat("\"name\" : \"");
|
|
280
|
-
fileData = fileData.concat(`${name}`);
|
|
281
|
-
fileData = fileData.concat("\", \n\t");
|
|
282
|
-
fileData = fileData.concat("\"properties\" : [ ] \n");
|
|
283
|
-
fileData = fileData.concat("}");
|
|
284
|
-
return fs.writeFileSync( join(directory, "/config-ext.json"), fileData, { encoding: 'utf8' });
|
|
285
|
-
}
|
|
286
|
-
*/
|
|
287
|
-
|
|
288
273
|
|
|
289
274
|
export const getComponentsObj = async (showSeparator = false, category = CATEGORY_CUSTOM) => {
|
|
290
275
|
const currentDirectory = process.cwd();
|