@ind-rcg/modeler-sfdx-cli-plugin 258.1022.0 → 260.1022.0
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/lib/model/buildStatus.js +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +25 -46
package/lib/model/buildStatus.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WorkspaceConstants}from"../constants.js";import{InvalidArgumentError,ErrorTypes}from"../types/errors.js";import{MessagesBundle,MessagesBundleWorkspace,MessagesBundleWorkspaceBuild,MessagesBundleWorkspaceValidate}from"../types/messages.js";import{createSfError}from"../utils/errorHelper.js";import{FSHelper}from"../utils/fsHelper.js";import{join,relative}from"../utils/pathHelper.js";import{getMessage}from"../utils/messageHelper.js";import{PackageConstants}from"../utils/packageHelper.js";import{isDefined,isEmpty}from"../utils/validationHelper.js";export var GenerationLogLevel;!function(t){t.TRACE="TRACE",t.DEBUG="DEBUG",t.INFO="INFO",t.WARN="WARN",t.ERROR="ERROR"}(GenerationLogLevel||(GenerationLogLevel={}));export var ValidationSeverity;!function(t){t.INFO="INFO",t.WARN="WARN",t.ERROR="ERROR",t.FATAL="FATAL"}(ValidationSeverity||(ValidationSeverity={}));export class BuildStatus{generationStatus;validationStatus;applicationBuildPath;constructor(t,e,s){this.generationStatus=t,this.validationStatus=e,this.applicationBuildPath=s}static getGenerationStatusFilePath(t){return join(t,WorkspaceConstants.WORKSPACE_APPLICATION_BUILD_STATUS_FILE)}static fromWorkspace(t){if(!isDefined(t))throw new InvalidArgumentError("workspace");if(t.exists()){const e=ValidatorStatus.fromWorkspace(t),s=t.getApplicationBuildPath(),a=BuildStatus.getGenerationStatusFilePath(s),r=FSHelper.existsFile(a)?FSHelper.readJsonFile(a):{status:GenerationLogLevel.INFO,processStarted:"",lastUpdated:"",processFinished:"",messages:[]};return new BuildStatus(r,e,s)}throw new Error(getMessage(MessagesBundle.Workspace,MessagesBundleWorkspace.WorkspaceNotFound,[t.getBasePath()]))}wasSuccess(){return this.hasContent()&&!(this.hasGenerationErrors()||this.hasValidationErrors())}ensureSuccess(){if(!this.wasSuccess()){let t;throw t=this.hasGenerationErrors()?this.getBuildErrors():this.hasValidationErrors()?getMessage(MessagesBundle.WorkspaceBuild,MessagesBundleWorkspaceBuild.ValidationErrors,[ValidatorStatus.getValidationStatusFilePath(this.applicationBuildPath)]):getMessage(MessagesBundle.WorkspaceBuild,MessagesBundleWorkspaceBuild.NoOutput),createSfError(ErrorTypes.BuildStatusError,t)}}getBuildErrors(){let t="";return this.generationStatus.messages.forEach((e=>{e.level===GenerationLogLevel.ERROR&&(t+=e.message)})),t}hasGenerationErrors(){return(this.generationStatus?.messages??[]).some((t=>t.level===GenerationLogLevel.ERROR))}hasValidationErrors(){return this.validationStatus.hasValidationErrors()}hasContent(){return!this.isGenerationEmpty()&&this.validationStatus.hasContent()}isGenerationEmpty(){return isEmpty(this.generationStatus.messages)&&!(this.generationStatus.status in GenerationLogLevel)}}export class ValidatorStatus{validationStatus;applicationBuildPath;workspacePath;constructor(t,e,s){this.validationStatus=t,this.applicationBuildPath=e,this.workspacePath=s}static getApplicationClockworkPath(t){return join(t,PackageConstants.PACKAGE_APP_FOLDER_NAME,PackageConstants.PACKAGE_APP_CLOCKWORK_FOLDER_NAME)}static getValidationStatusFilePath(t){return join(this.getApplicationClockworkPath(t),WorkspaceConstants.WORKSPACE_APPLICATION_VALIDATION_RESULT_FILE)}static getGeneratorHandoverFilePath(t){return join(t,PackageConstants.PACKAGE_APP_FOLDER_NAME,PackageConstants.PACKAGE_APP_CLOCKWORK_FOLDER_NAME,WorkspaceConstants.WORKSPACE_APPLICATION_GENERATOR_HANDOVER_FILE)}static fromWorkspace(t){if(!isDefined(t))throw new InvalidArgumentError("workspace");if(t.exists()){const e=t.getApplicationBuildPath(),s=ValidatorStatus.getValidationStatusFilePath(e),a=FSHelper.existsFile(s)?FSHelper.readJsonFile(s):[];return new ValidatorStatus(a,e,t.getBasePath())}throw new Error(getMessage(MessagesBundle.Workspace,MessagesBundleWorkspace.WorkspaceNotFound,[t.getBasePath()]))}wasSuccess(){return this.hasContent()&&!this.hasValidationErrors()}ensureSuccess(){if(!this.wasSuccess()){let t;throw t=this.hasValidationErrors()?getMessage(MessagesBundle.WorkspaceValidate,MessagesBundleWorkspaceValidate.ValidationErrors,[ValidatorStatus.getValidationStatusFilePath(this.applicationBuildPath)]):getMessage(MessagesBundle.WorkspaceValidate,MessagesBundleWorkspaceValidate.NoOutput),createSfError(ErrorTypes.ValidateWorkspaceError,t)}}hasValidationErrors(){return this.validationStatus.some((t=>t.result.some((t=>this.isValidationError(t)))))}getValidationErrors(){const t=[];return this.validationStatus.forEach((e=>{e.result.forEach((s=>{this.isValidationError(s)&&t.push({file:relative(this.workspacePath,e.contractPath).concat(":",s
|
|
1
|
+
import{WorkspaceConstants}from"../constants.js";import{InvalidArgumentError,ErrorTypes}from"../types/errors.js";import{MessagesBundle,MessagesBundleWorkspace,MessagesBundleWorkspaceBuild,MessagesBundleWorkspaceValidate}from"../types/messages.js";import{createSfError}from"../utils/errorHelper.js";import{FSHelper}from"../utils/fsHelper.js";import{join,relative}from"../utils/pathHelper.js";import{getMessage}from"../utils/messageHelper.js";import{PackageConstants}from"../utils/packageHelper.js";import{isDefined,isEmpty}from"../utils/validationHelper.js";export var GenerationLogLevel;!function(t){t.TRACE="TRACE",t.DEBUG="DEBUG",t.INFO="INFO",t.WARN="WARN",t.ERROR="ERROR"}(GenerationLogLevel||(GenerationLogLevel={}));export var ValidationSeverity;!function(t){t.INFO="INFO",t.WARN="WARN",t.ERROR="ERROR",t.FATAL="FATAL"}(ValidationSeverity||(ValidationSeverity={}));export class BuildStatus{generationStatus;validationStatus;applicationBuildPath;constructor(t,e,s){this.generationStatus=t,this.validationStatus=e,this.applicationBuildPath=s}static getGenerationStatusFilePath(t){return join(t,WorkspaceConstants.WORKSPACE_APPLICATION_BUILD_STATUS_FILE)}static fromWorkspace(t){if(!isDefined(t))throw new InvalidArgumentError("workspace");if(t.exists()){const e=ValidatorStatus.fromWorkspace(t),s=t.getApplicationBuildPath(),a=BuildStatus.getGenerationStatusFilePath(s),r=FSHelper.existsFile(a)?FSHelper.readJsonFile(a):{status:GenerationLogLevel.INFO,processStarted:"",lastUpdated:"",processFinished:"",messages:[]};return new BuildStatus(r,e,s)}throw new Error(getMessage(MessagesBundle.Workspace,MessagesBundleWorkspace.WorkspaceNotFound,[t.getBasePath()]))}wasSuccess(){return this.hasContent()&&!(this.hasGenerationErrors()||this.hasValidationErrors())}ensureSuccess(){if(!this.wasSuccess()){let t;throw t=this.hasGenerationErrors()?this.getBuildErrors():this.hasValidationErrors()?getMessage(MessagesBundle.WorkspaceBuild,MessagesBundleWorkspaceBuild.ValidationErrors,[ValidatorStatus.getValidationStatusFilePath(this.applicationBuildPath)]):getMessage(MessagesBundle.WorkspaceBuild,MessagesBundleWorkspaceBuild.NoOutput),createSfError(ErrorTypes.BuildStatusError,t)}}getBuildErrors(){let t="";return this.generationStatus.messages.forEach((e=>{e.level===GenerationLogLevel.ERROR&&(t+=e.message)})),t}hasGenerationErrors(){return(this.generationStatus?.messages??[]).some((t=>t.level===GenerationLogLevel.ERROR))}hasValidationErrors(){return this.validationStatus.hasValidationErrors()}hasContent(){return!this.isGenerationEmpty()&&this.validationStatus.hasContent()}isGenerationEmpty(){return isEmpty(this.generationStatus.messages)&&!(this.generationStatus.status in GenerationLogLevel)}}export class ValidatorStatus{validationStatus;applicationBuildPath;workspacePath;constructor(t,e,s){this.validationStatus=t,this.applicationBuildPath=e,this.workspacePath=s}static getApplicationClockworkPath(t){return join(t,PackageConstants.PACKAGE_APP_FOLDER_NAME,PackageConstants.PACKAGE_APP_CLOCKWORK_FOLDER_NAME)}static getValidationStatusFilePath(t){return join(this.getApplicationClockworkPath(t),WorkspaceConstants.WORKSPACE_APPLICATION_VALIDATION_RESULT_FILE)}static getGeneratorHandoverFilePath(t){return join(t,PackageConstants.PACKAGE_APP_FOLDER_NAME,PackageConstants.PACKAGE_APP_CLOCKWORK_FOLDER_NAME,WorkspaceConstants.WORKSPACE_APPLICATION_GENERATOR_HANDOVER_FILE)}static fromWorkspace(t){if(!isDefined(t))throw new InvalidArgumentError("workspace");if(t.exists()){const e=t.getApplicationBuildPath(),s=ValidatorStatus.getValidationStatusFilePath(e),a=FSHelper.existsFile(s)?FSHelper.readJsonFile(s):[];return new ValidatorStatus(a,e,t.getBasePath())}throw new Error(getMessage(MessagesBundle.Workspace,MessagesBundleWorkspace.WorkspaceNotFound,[t.getBasePath()]))}wasSuccess(){return this.hasContent()&&!this.hasValidationErrors()}ensureSuccess(){if(!this.wasSuccess()){let t;throw t=this.hasValidationErrors()?getMessage(MessagesBundle.WorkspaceValidate,MessagesBundleWorkspaceValidate.ValidationErrors,[ValidatorStatus.getValidationStatusFilePath(this.applicationBuildPath)]):getMessage(MessagesBundle.WorkspaceValidate,MessagesBundleWorkspaceValidate.NoOutput),createSfError(ErrorTypes.ValidateWorkspaceError,t)}}hasValidationErrors(){return this.validationStatus.some((t=>t.result.some((t=>this.isValidationError(t)))))}getValidationErrors(){const t=[];return this.validationStatus.forEach((e=>{e.result.forEach((s=>{this.isValidationError(s)&&t.push({file:relative(this.workspacePath,e.contractPath).concat(":",s?.line?.toString()),...s})}))})),t}hasContent(){return!this.isValidationEmpty()}isValidationEmpty(){return isEmpty(this.validationStatus)}isValidationError(t){return t.severity===ValidationSeverity.ERROR||t.severity===ValidationSeverity.FATAL}}
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ind-rcg/modeler-sfdx-cli-plugin",
|
|
3
3
|
"displayName": "modeler-sfdx-cli-plugin",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "260.1022.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Salesforce",
|
|
7
7
|
"license": "BSD-3-Clause",
|
|
8
8
|
"description": "This plugin is an enhancement of the sfdx cli and provide you features to customize the Consumer Goods Cloud Mobility application. This version will be the replacement for the Consumer Goods Mobile Modeler which was hosted on a Windows Server machine.",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@ind-rcg/backend": "
|
|
11
|
-
"@ind-rcg/framework": "
|
|
12
|
-
"@ind-rcg/generator": "
|
|
13
|
-
"@inquirer/prompts": "7.
|
|
14
|
-
"@oclif/core": "4.
|
|
15
|
-
"@salesforce/core": "8.
|
|
16
|
-
"@salesforce/sf-plugins-core": "12.2.
|
|
10
|
+
"@ind-rcg/backend": "260.1004.0",
|
|
11
|
+
"@ind-rcg/framework": "260.1047.0",
|
|
12
|
+
"@ind-rcg/generator": "260.1016.0",
|
|
13
|
+
"@inquirer/prompts": "7.9.0",
|
|
14
|
+
"@oclif/core": "4.5.6",
|
|
15
|
+
"@salesforce/core": "8.23.2",
|
|
16
|
+
"@salesforce/sf-plugins-core": "12.2.4",
|
|
17
17
|
"@xmldom/xmldom": "0.9.8",
|
|
18
|
-
"chalk": "5.
|
|
18
|
+
"chalk": "5.6.2",
|
|
19
19
|
"cross-spawn": "7.0.6",
|
|
20
20
|
"decompress": "4.2.1",
|
|
21
21
|
"eta": "3.5.0",
|
|
22
|
-
"fs-extra": "11.3.
|
|
22
|
+
"fs-extra": "11.3.2",
|
|
23
23
|
"jszip": "3.10.1",
|
|
24
24
|
"klaw-sync": "7.0.0",
|
|
25
25
|
"latest-version": "9.0.0",
|
|
@@ -28,20 +28,20 @@
|
|
|
28
28
|
"xpath": "0.0.34"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@oclif/plugin-command-snapshot": "5.
|
|
32
|
-
"@salesforce/cli-plugins-testkit": "5.3.
|
|
33
|
-
"@salesforce/dev-scripts": "11.0.
|
|
34
|
-
"@salesforce/plugin-command-reference": "3.1.
|
|
35
|
-
"@salesforce/ts-sinon": "1.4.
|
|
31
|
+
"@oclif/plugin-command-snapshot": "5.3.7",
|
|
32
|
+
"@salesforce/cli-plugins-testkit": "5.3.41",
|
|
33
|
+
"@salesforce/dev-scripts": "11.0.4",
|
|
34
|
+
"@salesforce/plugin-command-reference": "3.1.75",
|
|
35
|
+
"@salesforce/ts-sinon": "1.4.31",
|
|
36
36
|
"@types/cross-spawn": "6.0.6",
|
|
37
37
|
"@types/decompress": "4.2.7",
|
|
38
38
|
"@types/fs-extra": "11.0.4",
|
|
39
39
|
"@types/klaw-sync": "6.0.5",
|
|
40
40
|
"c8": "10.1.3",
|
|
41
|
-
"eslint-plugin-sf-plugin": "1.20.
|
|
42
|
-
"oclif": "4.
|
|
41
|
+
"eslint-plugin-sf-plugin": "1.20.33",
|
|
42
|
+
"oclif": "4.22.32",
|
|
43
43
|
"ts-node": "10.9.2",
|
|
44
|
-
"typescript": "5.
|
|
44
|
+
"typescript": "5.9.3",
|
|
45
45
|
"uglifyjs-folder": "3.3.0"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
@@ -94,15 +94,15 @@
|
|
|
94
94
|
},
|
|
95
95
|
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
|
|
96
96
|
"resolutions": {
|
|
97
|
-
"@ind-rcg/backend/sqlite3/node-gyp": "11.
|
|
98
|
-
"@salesforce/core": "8.
|
|
97
|
+
"@ind-rcg/backend/sqlite3/node-gyp": "11.5.0",
|
|
98
|
+
"@salesforce/core": "8.23.2"
|
|
99
99
|
},
|
|
100
100
|
"overrides": {
|
|
101
|
-
"node-gyp": "11.
|
|
102
|
-
"@salesforce/core": "8.
|
|
101
|
+
"node-gyp": "11.5.0",
|
|
102
|
+
"@salesforce/core": "8.23.2"
|
|
103
103
|
},
|
|
104
104
|
"peerDependencies": {
|
|
105
|
-
"node-gyp": "11.
|
|
105
|
+
"node-gyp": "11.5.0"
|
|
106
106
|
},
|
|
107
107
|
"wireit": {
|
|
108
108
|
"build": {
|
|
@@ -169,21 +169,6 @@
|
|
|
169
169
|
"test:all"
|
|
170
170
|
]
|
|
171
171
|
},
|
|
172
|
-
"test:only": {
|
|
173
|
-
"command": "nyc mocha \"test/**/*.test.ts\"",
|
|
174
|
-
"env": {
|
|
175
|
-
"FORCE_COLOR": "2"
|
|
176
|
-
},
|
|
177
|
-
"files": [
|
|
178
|
-
"test/**/*.ts",
|
|
179
|
-
"src/**/*.ts",
|
|
180
|
-
"**/tsconfig.json",
|
|
181
|
-
".mocha*",
|
|
182
|
-
"!*.nut.ts",
|
|
183
|
-
".nycrc"
|
|
184
|
-
],
|
|
185
|
-
"output": []
|
|
186
|
-
},
|
|
187
172
|
"test:command-reference": {
|
|
188
173
|
"command": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" commandreference:generate --erroronwarnings",
|
|
189
174
|
"files": [
|
|
@@ -222,9 +207,6 @@
|
|
|
222
207
|
},
|
|
223
208
|
"test:unit": {
|
|
224
209
|
"command": "c8 --report-dir=./coverage/unit --check-coverage=false mocha \"test/**/*.test.ts\"",
|
|
225
|
-
"env": {
|
|
226
|
-
"FORCE_COLOR": "2"
|
|
227
|
-
},
|
|
228
210
|
"files": [
|
|
229
211
|
"test/**/*.ts",
|
|
230
212
|
"src/**/*.ts",
|
|
@@ -243,9 +225,6 @@
|
|
|
243
225
|
},
|
|
244
226
|
"test:nuts": {
|
|
245
227
|
"command": "c8 --report-dir=./coverage/nuts --check-coverage=false mocha \"test/**/*.nut.ts\" --slow 5000 --timeout 180000",
|
|
246
|
-
"env": {
|
|
247
|
-
"FORCE_COLOR": "2"
|
|
248
|
-
},
|
|
249
228
|
"files": [
|
|
250
229
|
"test/**/*.ts",
|
|
251
230
|
"src/**/*.ts",
|
|
@@ -299,7 +278,7 @@
|
|
|
299
278
|
}
|
|
300
279
|
},
|
|
301
280
|
"sfdx": {
|
|
302
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@ind-rcg/modeler-sfdx-cli-plugin/
|
|
303
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@ind-rcg/modeler-sfdx-cli-plugin/
|
|
281
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@ind-rcg/modeler-sfdx-cli-plugin/260.1022.0.crt",
|
|
282
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@ind-rcg/modeler-sfdx-cli-plugin/260.1022.0.sig"
|
|
304
283
|
}
|
|
305
284
|
}
|