@marsson/ciutils 0.0.14 → 0.2.1
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/README.md +86 -171
- package/lib/commands/create/file.js +1 -1
- package/lib/commands/create/file.js.map +1 -1
- package/lib/commands/reporton/deployment.js +1 -0
- package/lib/commands/reporton/deployment.js.map +1 -1
- package/lib/commands/validate/repository/metadata.js +372 -0
- package/lib/commands/validate/repository/metadata.js.map +1 -0
- package/messages/validate.repository.metadata.md +24 -0
- package/oclif.lock +3657 -2172
- package/oclif.manifest.json +90 -2
- package/package.json +21 -11
- package/lib/commands/create/file.d.ts +0 -16
- package/lib/commands/remove/assignments.d.ts +0 -20
- package/lib/commands/reporton/deployment.d.ts +0 -27
- package/lib/index.d.ts +0 -2
- package/lib/utils/Utils.d.ts +0 -61
- package/lib/utils/fileToContentVersion.d.ts +0 -10
package/oclif.manifest.json
CHANGED
@@ -71,7 +71,7 @@
|
|
71
71
|
"created-date": {
|
72
72
|
"char": "c",
|
73
73
|
"name": "created-date",
|
74
|
-
"summary": "
|
74
|
+
"summary": "Datetime value in ISO 8601 format (e.g., 2024-08-09T15:30:00Z).",
|
75
75
|
"hasDynamicHelp": false,
|
76
76
|
"multiple": false,
|
77
77
|
"type": "option"
|
@@ -259,7 +259,95 @@
|
|
259
259
|
"reporton:deployment",
|
260
260
|
"deployment:reporton"
|
261
261
|
]
|
262
|
+
},
|
263
|
+
"validate:repository:metadata": {
|
264
|
+
"aliases": [],
|
265
|
+
"args": {},
|
266
|
+
"description": "More information about a command. Don't repeat the summary.",
|
267
|
+
"examples": [
|
268
|
+
"<%= config.bin %> <%= command.id %>"
|
269
|
+
],
|
270
|
+
"flags": {
|
271
|
+
"json": {
|
272
|
+
"description": "Format output as json.",
|
273
|
+
"helpGroup": "GLOBAL",
|
274
|
+
"name": "json",
|
275
|
+
"allowNo": false,
|
276
|
+
"type": "boolean"
|
277
|
+
},
|
278
|
+
"flags-dir": {
|
279
|
+
"helpGroup": "GLOBAL",
|
280
|
+
"name": "flags-dir",
|
281
|
+
"summary": "Import flag values from a directory.",
|
282
|
+
"hasDynamicHelp": false,
|
283
|
+
"multiple": false,
|
284
|
+
"type": "option"
|
285
|
+
},
|
286
|
+
"name": {
|
287
|
+
"char": "n",
|
288
|
+
"description": "More information about a flag. Don't repeat the summary.",
|
289
|
+
"name": "name",
|
290
|
+
"required": false,
|
291
|
+
"summary": "Description of a flag.",
|
292
|
+
"hasDynamicHelp": false,
|
293
|
+
"multiple": false,
|
294
|
+
"type": "option"
|
295
|
+
},
|
296
|
+
"target-org": {
|
297
|
+
"char": "o",
|
298
|
+
"name": "target-org",
|
299
|
+
"noCacheDefault": true,
|
300
|
+
"required": true,
|
301
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
302
|
+
"hasDynamicHelp": true,
|
303
|
+
"multiple": false,
|
304
|
+
"type": "option"
|
305
|
+
},
|
306
|
+
"folder": {
|
307
|
+
"char": "f",
|
308
|
+
"name": "folder",
|
309
|
+
"required": true,
|
310
|
+
"summary": "The path to the deployment folder (ex. force-app/main/default/obects).",
|
311
|
+
"hasDynamicHelp": false,
|
312
|
+
"multiple": false,
|
313
|
+
"type": "option"
|
314
|
+
},
|
315
|
+
"debug": {
|
316
|
+
"char": "d",
|
317
|
+
"name": "debug",
|
318
|
+
"required": false,
|
319
|
+
"summary": "Show debug logs",
|
320
|
+
"allowNo": false,
|
321
|
+
"type": "boolean"
|
322
|
+
}
|
323
|
+
},
|
324
|
+
"hasDynamicHelp": true,
|
325
|
+
"hiddenAliases": [],
|
326
|
+
"id": "validate:repository:metadata",
|
327
|
+
"pluginAlias": "@marsson/ciutils",
|
328
|
+
"pluginName": "@marsson/ciutils",
|
329
|
+
"pluginType": "core",
|
330
|
+
"strict": true,
|
331
|
+
"summary": "Summary of a command.",
|
332
|
+
"enableJsonFlag": true,
|
333
|
+
"isESM": true,
|
334
|
+
"relativePath": [
|
335
|
+
"lib",
|
336
|
+
"commands",
|
337
|
+
"validate",
|
338
|
+
"repository",
|
339
|
+
"metadata.js"
|
340
|
+
],
|
341
|
+
"aliasPermutations": [],
|
342
|
+
"permutations": [
|
343
|
+
"validate:repository:metadata",
|
344
|
+
"repository:validate:metadata",
|
345
|
+
"repository:metadata:validate",
|
346
|
+
"validate:metadata:repository",
|
347
|
+
"metadata:validate:repository",
|
348
|
+
"metadata:repository:validate"
|
349
|
+
]
|
262
350
|
}
|
263
351
|
},
|
264
|
-
"version": "0.
|
352
|
+
"version": "0.2.1"
|
265
353
|
}
|
package/package.json
CHANGED
@@ -1,28 +1,30 @@
|
|
1
1
|
{
|
2
2
|
"name": "@marsson/ciutils",
|
3
3
|
"description": " Utilities for enabling continuous integration for Salesforce development under SF CLI",
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.2.1",
|
5
5
|
"dependencies": {
|
6
|
-
"@oclif/core": "^
|
7
|
-
"@salesforce/core": "^
|
8
|
-
"@salesforce/
|
6
|
+
"@oclif/core": "^4",
|
7
|
+
"@salesforce/core": "^8.11.0",
|
8
|
+
"@salesforce/plugin-deploy-retrieve": "^3.19.0",
|
9
|
+
"@salesforce/sf-plugins-core": "^12",
|
9
10
|
"cli-progress": "^3.12.0",
|
10
11
|
"cli-table3": "^0.6.3",
|
11
12
|
"form-data": "^4.0.0",
|
12
|
-
"jsforce": "
|
13
|
+
"jsforce": "3.8.1",
|
13
14
|
"moment": "^2.30.1",
|
14
15
|
"yarn": "^1.22.22"
|
15
16
|
},
|
16
17
|
"devDependencies": {
|
17
|
-
"@oclif/plugin-command-snapshot": "^5.1.
|
18
|
-
"@salesforce/cli-plugins-testkit": "^5.
|
19
|
-
"@salesforce/dev-scripts": "^
|
18
|
+
"@oclif/plugin-command-snapshot": "^5.1.9",
|
19
|
+
"@salesforce/cli-plugins-testkit": "^5.3.39",
|
20
|
+
"@salesforce/dev-scripts": "^10.2.11",
|
21
|
+
"@types/cli-progress": "^3.11.6",
|
20
22
|
"@types/jsforce": "^1.11.5",
|
21
|
-
"eslint-plugin-sf-plugin": "^1.18.
|
22
|
-
"oclif": "^4.
|
23
|
+
"eslint-plugin-sf-plugin": "^1.18.6",
|
24
|
+
"oclif": "^4.14.0",
|
23
25
|
"shx": "0.3.4",
|
24
26
|
"ts-node": "^10.9.2",
|
25
|
-
"typescript": "^5.
|
27
|
+
"typescript": "^5.6.3"
|
26
28
|
},
|
27
29
|
"engines": {
|
28
30
|
"node": ">=18.0.0"
|
@@ -59,6 +61,14 @@
|
|
59
61
|
},
|
60
62
|
"remove": {
|
61
63
|
"description": "description for remove"
|
64
|
+
},
|
65
|
+
"validate": {
|
66
|
+
"description": "description for validate",
|
67
|
+
"subtopics": {
|
68
|
+
"repository": {
|
69
|
+
"description": "description for validate.repository"
|
70
|
+
}
|
71
|
+
}
|
62
72
|
}
|
63
73
|
},
|
64
74
|
"flexibleTaxonomy": true
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import { SfCommand } from '@salesforce/sf-plugins-core';
|
2
|
-
import { ContentVersion } from '../../utils/fileToContentVersion.js';
|
3
|
-
export default class DataCreateFile extends SfCommand<ContentVersion> {
|
4
|
-
static readonly summary: string;
|
5
|
-
static readonly description: string;
|
6
|
-
static readonly examples: string[];
|
7
|
-
static readonly flags: {
|
8
|
-
'target-org': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
9
|
-
'api-version': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
10
|
-
title: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
11
|
-
file: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
12
|
-
'parent-id': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
13
|
-
'created-date': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
14
|
-
};
|
15
|
-
run(): Promise<ContentVersion>;
|
16
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import { SfCommand } from '@salesforce/sf-plugins-core';
|
2
|
-
export type RemoveAssignmentsResult = {
|
3
|
-
path: string;
|
4
|
-
};
|
5
|
-
export default class RemoveAssignments extends SfCommand<RemoveAssignmentsResult> {
|
6
|
-
static readonly summary: string;
|
7
|
-
static readonly description: string;
|
8
|
-
static readonly examples: string[];
|
9
|
-
static readonly flags: {
|
10
|
-
name: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
11
|
-
object: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<("PermissionSet" | "PermissionSetGroup" | "Group")[], import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
12
|
-
usernames: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string[], import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
13
|
-
'target-org': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
14
|
-
};
|
15
|
-
private connection;
|
16
|
-
run(): Promise<RemoveAssignmentsResult>;
|
17
|
-
private matchUsersAndGenerateOrgUserList;
|
18
|
-
private processHandler;
|
19
|
-
private finalize;
|
20
|
-
}
|
@@ -1,27 +0,0 @@
|
|
1
|
-
import { SfCommand } from '@salesforce/sf-plugins-core';
|
2
|
-
import { DeployResult } from 'jsforce/api/metadata';
|
3
|
-
export type ReportonDeploymentResult = DeployResult;
|
4
|
-
export default class ReportonDeployment extends SfCommand<ReportonDeploymentResult> {
|
5
|
-
static readonly summary: string;
|
6
|
-
static readonly description: string;
|
7
|
-
static readonly examples: string[];
|
8
|
-
static readonly flags: {
|
9
|
-
'target-org': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
10
|
-
deploymentid: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
11
|
-
awaitcompletion: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
12
|
-
};
|
13
|
-
private connection;
|
14
|
-
private deploymentStatus;
|
15
|
-
private multiBar;
|
16
|
-
private b1;
|
17
|
-
private b2;
|
18
|
-
private isComplete;
|
19
|
-
run(): Promise<ReportonDeploymentResult>;
|
20
|
-
private awaitDeploymentCompletion;
|
21
|
-
private updateDeployResult;
|
22
|
-
private updateProgressBars;
|
23
|
-
private displayHeader;
|
24
|
-
private printDeploymentReport;
|
25
|
-
private printErrors;
|
26
|
-
private printSuccess;
|
27
|
-
}
|
package/lib/index.d.ts
DELETED
package/lib/utils/Utils.d.ts
DELETED
@@ -1,61 +0,0 @@
|
|
1
|
-
import { Connection } from '@salesforce/core';
|
2
|
-
import { RecordResult } from 'jsforce/record-result.js';
|
3
|
-
declare class AssignmentHelper {
|
4
|
-
}
|
5
|
-
declare enum ProcessStatus {
|
6
|
-
SUCCESS = 0,
|
7
|
-
FAILURE = 1,
|
8
|
-
UNPROCCESSED = 2
|
9
|
-
}
|
10
|
-
declare class OrgDetails {
|
11
|
-
private static MARSSON_EXCEPTION_APEX;
|
12
|
-
private static isASandbox;
|
13
|
-
private static sandboxName;
|
14
|
-
static isSandbox(con: Connection): Promise<boolean>;
|
15
|
-
static getSandboxName(con: Connection): Promise<string | void>;
|
16
|
-
}
|
17
|
-
declare class UserNameOrg {
|
18
|
-
username: string | undefined;
|
19
|
-
orgUsername: string | undefined;
|
20
|
-
userId: string | undefined;
|
21
|
-
error: UserNameOrgError | undefined;
|
22
|
-
groups: UnassignableObject[];
|
23
|
-
permissionsets: UnassignableObject[];
|
24
|
-
permissionsetgroups: UnassignableObject[];
|
25
|
-
constructor(orgName: string | void, username: string);
|
26
|
-
}
|
27
|
-
declare enum UserNameOrgError {
|
28
|
-
NO_ERROR = "",
|
29
|
-
USER_NOT_FOUND = "Username not found in org"
|
30
|
-
}
|
31
|
-
declare class UnassignableObject {
|
32
|
-
static OBJECT_CONVERT: Map<string, string>;
|
33
|
-
unassinableType: string;
|
34
|
-
objectid: string;
|
35
|
-
parentId: string;
|
36
|
-
processStatus: ProcessStatus;
|
37
|
-
errorMessage: string | undefined;
|
38
|
-
constructor(unasObject: string, objId: string, parentId: string);
|
39
|
-
static createUnassignablesforGroups(groups: SObject[]): UnassignableObject[];
|
40
|
-
static createUnassignablesforPermissionSet(groups: SObject[]): UnassignableObject[];
|
41
|
-
static createUnassignablesforPermissionSetGroup(groups: SObject[]): UnassignableObject[];
|
42
|
-
}
|
43
|
-
declare class BatchDownloadHelper {
|
44
|
-
static fetchAllUsers(conn: Connection): Promise<SObject[]>;
|
45
|
-
static fetchMultipleObjectsInParallell(conn: Connection): Promise<{
|
46
|
-
users: SObject[];
|
47
|
-
groupmembers: SObject[];
|
48
|
-
permissionsets: SObject[];
|
49
|
-
permissionsetgroups: SObject[];
|
50
|
-
}>;
|
51
|
-
static deleteObjectsFromUnassignableObjects(conn: Connection, unassignableObjects: UnassignableObject[]): Promise<void>;
|
52
|
-
static bulkDeleteRecords(conn: Connection, records: SObject[], objectType: string): Promise<RecordResult[]>;
|
53
|
-
static updateUnassignableDeletionResult(records: SObject[], results: RecordResult[], unassignableObjects: UnassignableObject[]): void;
|
54
|
-
private static bulkQuery;
|
55
|
-
}
|
56
|
-
interface SObject {
|
57
|
-
[key: string]: unknown;
|
58
|
-
Id: string;
|
59
|
-
}
|
60
|
-
declare function mapSObjectsByKeyField(sobjects: SObject[], keyField: string): Map<string, SObject[]>;
|
61
|
-
export { OrgDetails, UserNameOrg, BatchDownloadHelper, AssignmentHelper, mapSObjectsByKeyField, UnassignableObject, SObject, UserNameOrgError, };
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { Connection } from '@salesforce/core';
|
2
|
-
import type { Record } from '@jsforce/jsforce-node';
|
3
|
-
export type ContentVersion = {
|
4
|
-
Title: string;
|
5
|
-
FileExtension: string;
|
6
|
-
VersionData: string;
|
7
|
-
/** this could be undefined outside of our narrow use case (created files) */
|
8
|
-
ContentDocumentId: string;
|
9
|
-
} & Record;
|
10
|
-
export declare function file2CV(conn: Connection, filepath: string, title?: string, createdDate?: string): Promise<ContentVersion>;
|