@sharinpix/sharinpix-sf-cli 1.8.0 → 1.9.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/commands/sharinpix/form/push.js +38 -60
- package/lib/commands/sharinpix/form/push.js.map +1 -1
- package/lib/commands/sharinpix/permission/push.js +29 -40
- package/lib/commands/sharinpix/permission/push.js.map +1 -1
- package/lib/helpers/utils.d.ts +7 -0
- package/lib/helpers/utils.js +32 -0
- package/lib/helpers/utils.js.map +1 -1
- package/oclif.lock +12 -0
- package/oclif.manifest.json +1 -1
- package/package.json +3 -1
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
/* eslint-disable
|
|
1
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
2
|
/* eslint-disable no-await-in-loop */
|
|
3
|
-
import fs from 'node:fs';
|
|
4
|
-
import path from 'node:path';
|
|
5
3
|
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
6
4
|
import { Messages } from '@salesforce/core';
|
|
7
|
-
import { isJsonEqual } from '../../../helpers/utils.js';
|
|
5
|
+
import { isJsonEqual, readJsonFile, getNameFromJson, getJsonFiles, fetchJson, formatErrorMessage, } from '../../../helpers/utils.js';
|
|
8
6
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
9
7
|
const messages = Messages.loadMessages('@sharinpix/sharinpix-sf-cli', 'sharinpix.form.push');
|
|
10
8
|
export default class Push extends SfCommand {
|
|
@@ -27,10 +25,7 @@ export default class Push extends SfCommand {
|
|
|
27
25
|
async run() {
|
|
28
26
|
const { flags } = await this.parse(Push);
|
|
29
27
|
const connection = flags.org.getConnection('63.0');
|
|
30
|
-
const files =
|
|
31
|
-
.readdirSync('sharinpix/forms')
|
|
32
|
-
.filter((file) => file.endsWith('.json'))
|
|
33
|
-
.map((file) => path.join('sharinpix/forms', file));
|
|
28
|
+
const files = getJsonFiles('sharinpix/forms');
|
|
34
29
|
const body = {
|
|
35
30
|
// eslint-disable-next-line camelcase
|
|
36
31
|
form_template_create: true,
|
|
@@ -45,40 +40,23 @@ export default class Push extends SfCommand {
|
|
|
45
40
|
let skipped = 0;
|
|
46
41
|
let deleted = 0;
|
|
47
42
|
for (const file of files) {
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
const fileName = json.name;
|
|
43
|
+
const processFile = async () => {
|
|
44
|
+
const json = readJsonFile(file);
|
|
45
|
+
const fileName = getNameFromJson(json);
|
|
52
46
|
const existingRecord = existingMap.get(fileName);
|
|
53
47
|
const existingId = existingRecord?.Id ?? null;
|
|
54
48
|
if (existingRecord) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
Accept: 'application/json',
|
|
59
|
-
},
|
|
49
|
+
const existingJson = await fetchJson(existingRecord.sharinpix__FormUrl__c + '.json').catch((error) => {
|
|
50
|
+
this.warn(`Failed to check changes for ${fileName}, proceeding with update: ${formatErrorMessage(error)}`);
|
|
51
|
+
return null;
|
|
60
52
|
});
|
|
61
|
-
if (
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
if (existingJson) {
|
|
66
|
-
try {
|
|
67
|
-
if (isJsonEqual(json, existingJson)) {
|
|
68
|
-
this.log(messages.getMessage('info.skipped', [fileName]));
|
|
69
|
-
skipped++;
|
|
70
|
-
continue;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
catch (parseError) {
|
|
74
|
-
this.warn(`Failed to parse stored JSON for ${fileName}, proceeding with update`);
|
|
75
|
-
failed++;
|
|
76
|
-
continue;
|
|
77
|
-
}
|
|
53
|
+
if (existingJson && isJsonEqual(json, existingJson)) {
|
|
54
|
+
this.log(messages.getMessage('info.skipped', [fileName]));
|
|
55
|
+
skipped++;
|
|
56
|
+
return;
|
|
78
57
|
}
|
|
79
58
|
}
|
|
80
|
-
|
|
81
|
-
const responseData = await (await fetch(`${responseToken.host}/api/v1/form/templates`, {
|
|
59
|
+
const response = await fetch(`${responseToken.host}/api/v1/form/templates`, {
|
|
82
60
|
method: 'POST',
|
|
83
61
|
body: JSON.stringify({
|
|
84
62
|
sfid: existingId ?? undefined,
|
|
@@ -92,7 +70,11 @@ export default class Push extends SfCommand {
|
|
|
92
70
|
Accept: 'application/json',
|
|
93
71
|
Authorization: `Bearer ${responseToken.token}`,
|
|
94
72
|
},
|
|
95
|
-
})
|
|
73
|
+
});
|
|
74
|
+
if (!response.ok) {
|
|
75
|
+
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
76
|
+
}
|
|
77
|
+
const responseData = (await response.json());
|
|
96
78
|
const formTemplateJson = JSON.stringify({
|
|
97
79
|
...json,
|
|
98
80
|
url: responseData.url,
|
|
@@ -103,41 +85,37 @@ export default class Push extends SfCommand {
|
|
|
103
85
|
url: responseData.url,
|
|
104
86
|
formTemplateJson,
|
|
105
87
|
});
|
|
106
|
-
|
|
107
|
-
|
|
88
|
+
this.log(messages.getMessage(existingId ? 'info.updated' : 'info.created', [fileName]));
|
|
89
|
+
uploaded++;
|
|
90
|
+
};
|
|
91
|
+
await processFile().catch((error) => {
|
|
92
|
+
try {
|
|
93
|
+
const json = readJsonFile(file);
|
|
94
|
+
const fileName = getNameFromJson(json);
|
|
95
|
+
this.warn(`Failed to push form template ${fileName}: ${formatErrorMessage(error)}`);
|
|
108
96
|
}
|
|
109
|
-
|
|
110
|
-
this.
|
|
97
|
+
catch {
|
|
98
|
+
this.warn(`Failed to parse JSON for form template in ${file}: ${formatErrorMessage(error)}`);
|
|
111
99
|
}
|
|
112
|
-
uploaded++;
|
|
113
|
-
}
|
|
114
|
-
catch (error) {
|
|
115
|
-
const fileContent = fs.readFileSync(file, 'utf8');
|
|
116
|
-
const json = JSON.parse(fileContent);
|
|
117
|
-
const fileName = json.name;
|
|
118
|
-
this.warn(`Failed to push form template ${fileName}: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
119
100
|
failed++;
|
|
120
|
-
|
|
121
|
-
}
|
|
101
|
+
});
|
|
122
102
|
}
|
|
123
|
-
// Handle deletion of records that no longer have corresponding local files
|
|
124
103
|
if (flags.delete) {
|
|
125
104
|
const localFileNames = new Set(files.map((file) => {
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
return json.name;
|
|
105
|
+
const json = readJsonFile(file);
|
|
106
|
+
return getNameFromJson(json);
|
|
129
107
|
}));
|
|
130
108
|
for (const [recordName, record] of existingMap) {
|
|
131
109
|
if (!localFileNames.has(recordName)) {
|
|
132
|
-
|
|
133
|
-
|
|
110
|
+
await connection.sobject('sharinpix__FormTemplate__c').delete(record.Id)
|
|
111
|
+
.then(() => {
|
|
134
112
|
this.log(messages.getMessage('info.deleted', [recordName]));
|
|
135
113
|
deleted++;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
this.warn(`Failed to delete form template ${recordName}: ${error
|
|
114
|
+
})
|
|
115
|
+
.catch((error) => {
|
|
116
|
+
this.warn(`Failed to delete form template ${recordName}: ${formatErrorMessage(error)}`);
|
|
139
117
|
failed++;
|
|
140
|
-
}
|
|
118
|
+
});
|
|
141
119
|
}
|
|
142
120
|
}
|
|
143
121
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../../src/commands/sharinpix/form/push.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../../src/commands/sharinpix/form/push.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,qCAAqC;AACrC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,WAAW,EACX,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,SAAS,EACT,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AAEnC,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,C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AC,CAAC;yBACD,KAAK,CAAC,CAAC,KAAY,EAAE,EAAE;wBACtB,IAAI,CAAC,IAAI,CAAC,kCAAkC,UAAU,KAAK,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;wBACxF,MAAM,EAAE,CAAC;oBACX,CAAC,CAAC,CAAC;gBACP,CAAC;YACH,CAAC;QACH,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;QAEpF,OAAO;YACL,IAAI,EAAE,IAAI;YACV,QAAQ;YACR,MAAM;YACN,OAAO;YACP,OAAO;SACR,CAAC;IACJ,CAAC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
/* eslint-disable
|
|
1
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
2
|
/* eslint-disable no-await-in-loop */
|
|
3
|
-
import fs from 'node:fs';
|
|
4
|
-
import path from 'node:path';
|
|
5
3
|
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
6
4
|
import { Messages } from '@salesforce/core';
|
|
7
|
-
import { isJsonEqual } from '../../../helpers/utils.js';
|
|
5
|
+
import { isJsonEqual, readJsonFile, getNameFromJson, getJsonFiles, formatErrorMessage, } from '../../../helpers/utils.js';
|
|
8
6
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
9
7
|
const messages = Messages.loadMessages('@sharinpix/sharinpix-sf-cli', 'sharinpix.permission.push');
|
|
10
8
|
export default class Push extends SfCommand {
|
|
@@ -27,10 +25,7 @@ export default class Push extends SfCommand {
|
|
|
27
25
|
async run() {
|
|
28
26
|
const { flags } = await this.parse(Push);
|
|
29
27
|
const connection = flags.org.getConnection('63.0');
|
|
30
|
-
const files =
|
|
31
|
-
.readdirSync('sharinpix/permissions')
|
|
32
|
-
.filter((file) => file.endsWith('.json'))
|
|
33
|
-
.map((file) => path.join('sharinpix/permissions', file));
|
|
28
|
+
const files = getJsonFiles('sharinpix/permissions');
|
|
34
29
|
const existingRecords = (await connection.query('SELECT Id, Name, sharinpix__Description__c, sharinpix__Json__c FROM sharinpix__SharinPixPermission__c')).records;
|
|
35
30
|
const existingMap = new Map(existingRecords.map((record) => [record.Name, record]));
|
|
36
31
|
let uploaded = 0;
|
|
@@ -38,29 +33,25 @@ export default class Push extends SfCommand {
|
|
|
38
33
|
let skipped = 0;
|
|
39
34
|
let deleted = 0;
|
|
40
35
|
for (const file of files) {
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const fileName = json.name;
|
|
36
|
+
const processFile = async () => {
|
|
37
|
+
const json = readJsonFile(file);
|
|
38
|
+
const fileName = getNameFromJson(json);
|
|
45
39
|
const existingRecord = existingMap.get(fileName);
|
|
46
|
-
const existingId = existingRecord?.Id ?? null;
|
|
47
40
|
const jsonWithoutName = { ...json };
|
|
48
41
|
delete jsonWithoutName.name;
|
|
49
42
|
if (existingRecord) {
|
|
50
|
-
// Check if permission has changed by comparing with stored JSON
|
|
51
43
|
try {
|
|
52
44
|
const existingJson = JSON.parse(existingRecord.sharinpix__Json__c);
|
|
53
45
|
if (isJsonEqual(jsonWithoutName, existingJson)) {
|
|
54
46
|
this.log(messages.getMessage('info.skipped', [fileName]));
|
|
55
47
|
skipped++;
|
|
56
|
-
|
|
48
|
+
return;
|
|
57
49
|
}
|
|
58
50
|
}
|
|
59
51
|
catch (parseError) {
|
|
60
52
|
this.warn(`Failed to parse stored JSON for ${fileName}, proceeding with update`);
|
|
61
53
|
}
|
|
62
54
|
}
|
|
63
|
-
// Update or create the permission record
|
|
64
55
|
const permissionData = {
|
|
65
56
|
Name: fileName,
|
|
66
57
|
// eslint-disable-next-line camelcase
|
|
@@ -70,48 +61,46 @@ export default class Push extends SfCommand {
|
|
|
70
61
|
sharinpix__Description__c: existingRecord.sharinpix__Description__c,
|
|
71
62
|
}),
|
|
72
63
|
};
|
|
73
|
-
if (
|
|
74
|
-
// Update existing record
|
|
64
|
+
if (existingRecord?.Id) {
|
|
75
65
|
await connection.sobject('sharinpix__SharinPixPermission__c').update({
|
|
76
66
|
...permissionData,
|
|
77
|
-
Id:
|
|
67
|
+
Id: existingRecord.Id,
|
|
78
68
|
});
|
|
79
|
-
this.log(messages.getMessage('info.updated', [fileName]));
|
|
80
69
|
}
|
|
81
70
|
else {
|
|
82
|
-
// Create new record
|
|
83
71
|
await connection.sobject('sharinpix__SharinPixPermission__c').create(permissionData);
|
|
84
|
-
this.log(messages.getMessage('info.created', [fileName]));
|
|
85
72
|
}
|
|
73
|
+
this.log(messages.getMessage(existingRecord ? 'info.updated' : 'info.created', [fileName]));
|
|
86
74
|
uploaded++;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
75
|
+
};
|
|
76
|
+
await processFile().catch((error) => {
|
|
77
|
+
try {
|
|
78
|
+
const json = readJsonFile(file);
|
|
79
|
+
const fileName = getNameFromJson(json);
|
|
80
|
+
this.warn(`Failed to push SharinPix permission ${fileName}: ${formatErrorMessage(error)}`);
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
this.warn(`Failed to parse JSON for SharinPix permission in ${file}: ${formatErrorMessage(error)}`);
|
|
84
|
+
}
|
|
93
85
|
failed++;
|
|
94
|
-
|
|
95
|
-
}
|
|
86
|
+
});
|
|
96
87
|
}
|
|
97
|
-
// Handle deletion of records that no longer have corresponding local files
|
|
98
88
|
if (flags.delete) {
|
|
99
89
|
const localFileNames = new Set(files.map((file) => {
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
return json.name;
|
|
90
|
+
const json = readJsonFile(file);
|
|
91
|
+
return getNameFromJson(json);
|
|
103
92
|
}));
|
|
104
93
|
for (const [recordName, record] of existingMap) {
|
|
105
94
|
if (!localFileNames.has(recordName)) {
|
|
106
|
-
|
|
107
|
-
|
|
95
|
+
await connection.sobject('sharinpix__SharinPixPermission__c').delete(record.Id)
|
|
96
|
+
.then(() => {
|
|
108
97
|
this.log(messages.getMessage('info.deleted', [recordName]));
|
|
109
98
|
deleted++;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
this.warn(`Failed to delete SharinPix permission ${recordName}: ${error
|
|
99
|
+
})
|
|
100
|
+
.catch((error) => {
|
|
101
|
+
this.warn(`Failed to delete SharinPix permission ${recordName}: ${formatErrorMessage(error)}`);
|
|
113
102
|
failed++;
|
|
114
|
-
}
|
|
103
|
+
});
|
|
115
104
|
}
|
|
116
105
|
}
|
|
117
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../../src/commands/sharinpix/permission/push.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../../src/commands/sharinpix/permission/push.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,qCAAqC;AACrC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,WAAW,EACX,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AAEnC,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,6BAA6B,EAAE,2BAA2B,CAAC,CAAC;AAiBnG,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,SAAqB;IAC9C,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC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AAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAsB;yBAClG,IAAI,CAAC,GAAG,EAAE;wBACT,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;wBAC5D,OAAO,EAAE,CAAC;oBACZ,CAAC,CAAC;yBACD,KAAK,CAAC,CAAC,KAAY,EAAE,EAAE;wBACtB,IAAI,CAAC,IAAI,CAAC,yCAAyC,UAAU,KAAK,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;wBAC/F,MAAM,EAAE,CAAC;oBACX,CAAC,CAAC,CAAC;gBACP,CAAC;YACH,CAAC;QACH,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;QAEpF,OAAO;YACL,IAAI,EAAE,IAAI;YACV,QAAQ;YACR,MAAM;YACN,OAAO;YACP,OAAO;SACR,CAAC;IACJ,CAAC"}
|
package/lib/helpers/utils.d.ts
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
export declare function isJsonEqual(obj1: unknown, obj2: unknown): boolean;
|
|
2
2
|
export declare function createSafeFilename(name: string): string;
|
|
3
|
+
export declare function readJsonFile(filePath: string): Record<string, unknown>;
|
|
4
|
+
export declare function writeJsonFile(filePath: string, data: unknown): void;
|
|
5
|
+
export declare function fetchJson(url: string): Promise<unknown>;
|
|
6
|
+
export declare function getNameFromJson(json: Record<string, unknown>): string;
|
|
7
|
+
export declare function ensureDirectoryExists(dirPath: string): void;
|
|
8
|
+
export declare function formatErrorMessage(error: unknown): string;
|
|
9
|
+
export declare function getJsonFiles(dirPath: string): string[];
|
package/lib/helpers/utils.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as crypto from 'node:crypto';
|
|
2
|
+
import fs from 'node:fs';
|
|
2
3
|
export function isJsonEqual(obj1, obj2) {
|
|
3
4
|
return JSON.stringify(obj1) === JSON.stringify(obj2);
|
|
4
5
|
}
|
|
@@ -6,4 +7,35 @@ export function createSafeFilename(name) {
|
|
|
6
7
|
const md5Hash = crypto.createHash('md5').update(name).digest('hex').slice(0, 8);
|
|
7
8
|
return `${name.replaceAll(/[^a-zA-Z0-9]/g, '_')}-${md5Hash}`;
|
|
8
9
|
}
|
|
10
|
+
export function readJsonFile(filePath) {
|
|
11
|
+
const fileContent = fs.readFileSync(filePath, 'utf8');
|
|
12
|
+
return JSON.parse(fileContent);
|
|
13
|
+
}
|
|
14
|
+
export function writeJsonFile(filePath, data) {
|
|
15
|
+
fs.writeFileSync(filePath, JSON.stringify(data, null, 2));
|
|
16
|
+
}
|
|
17
|
+
export async function fetchJson(url) {
|
|
18
|
+
const response = await fetch(url, {
|
|
19
|
+
headers: { Accept: 'application/json' },
|
|
20
|
+
});
|
|
21
|
+
if (!response.ok) {
|
|
22
|
+
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
23
|
+
}
|
|
24
|
+
return response.json();
|
|
25
|
+
}
|
|
26
|
+
export function getNameFromJson(json) {
|
|
27
|
+
return json.name;
|
|
28
|
+
}
|
|
29
|
+
export function ensureDirectoryExists(dirPath) {
|
|
30
|
+
fs.mkdirSync(dirPath, { recursive: true });
|
|
31
|
+
}
|
|
32
|
+
export function formatErrorMessage(error) {
|
|
33
|
+
return error instanceof Error ? error.message : 'Unknown error';
|
|
34
|
+
}
|
|
35
|
+
export function getJsonFiles(dirPath) {
|
|
36
|
+
return fs
|
|
37
|
+
.readdirSync(dirPath)
|
|
38
|
+
.filter((file) => file.endsWith('.json'))
|
|
39
|
+
.map((file) => `${dirPath}/${file}`);
|
|
40
|
+
}
|
|
9
41
|
//# sourceMappingURL=utils.js.map
|
package/lib/helpers/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","s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AC;IAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,QAAQ,QAAQ,CAAC,MAAM,KAAK,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;IACrE,CAAC;IAED,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAA6B;IAC3D,OAAO,IAAI,CAAC,IAAc,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,OAAe;IACnD,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,OAAO,EAAE;SACN,WAAW,CAAC,OAAO,CAAC;SACpB,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;SACxC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,OAAO,IAAI,IAAI,EAAE,CAAC,CAAC;AACzC,CAAC"}
|
package/oclif.lock
CHANGED
|
@@ -2711,6 +2711,13 @@
|
|
|
2711
2711
|
resolved "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz"
|
|
2712
2712
|
integrity sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==
|
|
2713
2713
|
|
|
2714
|
+
"@types/mock-fs@^4.13.4":
|
|
2715
|
+
version "4.13.4"
|
|
2716
|
+
resolved "https://registry.yarnpkg.com/@types/mock-fs/-/mock-fs-4.13.4.tgz#e73edb4b4889d44d23f1ea02d6eebe50aa30b09a"
|
|
2717
|
+
integrity sha512-mXmM0o6lULPI8z3XNnQCpL0BGxPwx1Ul1wXYEPBGl4efShyxW2Rln0JOPEWGyZaYZMM6OVXM/15zUuFMY52ljg==
|
|
2718
|
+
dependencies:
|
|
2719
|
+
"@types/node" "*"
|
|
2720
|
+
|
|
2714
2721
|
"@types/mute-stream@^0.0.4":
|
|
2715
2722
|
version "0.0.4"
|
|
2716
2723
|
resolved "https://registry.npmjs.org/@types/mute-stream/-/mute-stream-0.0.4.tgz"
|
|
@@ -7237,6 +7244,11 @@ mocha@^10.7.0:
|
|
|
7237
7244
|
yargs-parser "^20.2.9"
|
|
7238
7245
|
yargs-unparser "^2.0.0"
|
|
7239
7246
|
|
|
7247
|
+
mock-fs@^5.5.0:
|
|
7248
|
+
version "5.5.0"
|
|
7249
|
+
resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-5.5.0.tgz#94a46d299aaa588e735a201cbe823c876e91f385"
|
|
7250
|
+
integrity sha512-d/P1M/RacgM3dB0sJ8rjeRNXxtapkPCUnMGmIN0ixJ16F/E4GUZCvWcSGfWGz8eaXYvn1s9baUwNjI4LOPEjiA==
|
|
7251
|
+
|
|
7240
7252
|
mri@^1.2.0:
|
|
7241
7253
|
version "1.2.0"
|
|
7242
7254
|
resolved "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz"
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sharinpix/sharinpix-sf-cli",
|
|
3
3
|
"description": "SharinPix salesforce cli plugin",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.9.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@oclif/core": "^4",
|
|
7
7
|
"@salesforce/core": "^8",
|
|
@@ -183,8 +183,10 @@
|
|
|
183
183
|
"@salesforce/cli-plugins-testkit": "^5.3.10",
|
|
184
184
|
"@salesforce/dev-scripts": "^10",
|
|
185
185
|
"@types/mocha": "^10.0.7",
|
|
186
|
+
"@types/mock-fs": "^4.13.4",
|
|
186
187
|
"eslint-plugin-sf-plugin": "^1.18.6",
|
|
187
188
|
"husky": "^9.1.7",
|
|
189
|
+
"mock-fs": "^5.5.0",
|
|
188
190
|
"oclif": "^4.14.0",
|
|
189
191
|
"semantic-release": "^24.2.7",
|
|
190
192
|
"ts-node": "^10.9.2",
|