@salesforce/plugin-signups 1.5.6 → 2.0.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 +66 -66
- package/lib/commands/org/create/shape.d.ts +3 -3
- package/lib/commands/org/create/shape.js +20 -22
- package/lib/commands/org/create/shape.js.map +1 -1
- package/lib/commands/org/create/snapshot.d.ts +7 -7
- package/lib/commands/org/create/snapshot.js +46 -50
- package/lib/commands/org/create/snapshot.js.map +1 -1
- package/lib/commands/org/delete/shape.d.ts +5 -20
- package/lib/commands/org/delete/shape.js +28 -73
- package/lib/commands/org/delete/shape.js.map +1 -1
- package/lib/commands/org/delete/snapshot.d.ts +4 -4
- package/lib/commands/org/delete/snapshot.js +28 -30
- package/lib/commands/org/delete/snapshot.js.map +1 -1
- package/lib/commands/org/get/snapshot.d.ts +5 -5
- package/lib/commands/org/get/snapshot.js +27 -29
- package/lib/commands/org/get/snapshot.js.map +1 -1
- package/lib/commands/org/list/shape.d.ts +3 -7
- package/lib/commands/org/list/shape.js +22 -34
- package/lib/commands/org/list/shape.js.map +1 -1
- package/lib/commands/org/list/snapshot.d.ts +4 -4
- package/lib/commands/org/list/snapshot.js +21 -23
- package/lib/commands/org/list/snapshot.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/shared/deleteUtils.d.ts +19 -0
- package/lib/shared/deleteUtils.js +58 -0
- package/lib/shared/deleteUtils.js.map +1 -0
- package/lib/shared/orgShapeListUtils.d.ts +13 -0
- package/lib/shared/orgShapeListUtils.js +26 -13
- package/lib/shared/orgShapeListUtils.js.map +1 -1
- package/lib/shared/snapshot.js +19 -24
- package/lib/shared/snapshot.js.map +1 -1
- package/messages/messages.md +4 -0
- package/oclif.lock +611 -718
- package/oclif.manifest.json +573 -245
- package/package.json +35 -55
@@ -1,23 +1,39 @@
|
|
1
|
-
"use strict";
|
2
1
|
/*
|
3
2
|
* Copyright (c) 2022, salesforce.com, inc.
|
4
3
|
* All rights reserved.
|
5
4
|
* Licensed under the BSD 3-Clause license.
|
6
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
7
6
|
*/
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
7
|
+
import { dirname } from 'node:path';
|
8
|
+
import { fileURLToPath } from 'node:url';
|
9
|
+
import { Flags, SfCommand, requiredOrgFlagWithDeprecations, orgApiVersionFlagWithDeprecations, loglevel, } from '@salesforce/sf-plugins-core';
|
10
|
+
import { Messages, SfError } from '@salesforce/core';
|
11
|
+
import { isShapeEnabled } from '../../../shared/orgShapeListUtils.js';
|
12
|
+
import utils from '../../../shared/deleteUtils.js';
|
13
|
+
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
|
14
|
+
const messages = Messages.loadMessages('@salesforce/plugin-signups', 'shape.delete');
|
15
|
+
export class OrgShapeDeleteCommand extends SfCommand {
|
16
|
+
static summary = messages.getMessage('summary');
|
17
|
+
static description = messages.getMessage('description');
|
18
|
+
static examples = messages.getMessages('examples');
|
19
|
+
static aliases = ['force:org:shape:delete'];
|
20
|
+
static deprecateAliases = true;
|
21
|
+
static flags = {
|
22
|
+
'target-org': requiredOrgFlagWithDeprecations,
|
23
|
+
'api-version': orgApiVersionFlagWithDeprecations,
|
24
|
+
loglevel,
|
25
|
+
'no-prompt': Flags.boolean({
|
26
|
+
char: 'p',
|
27
|
+
summary: messages.getMessage('flags.no-prompt.summary'),
|
28
|
+
aliases: ['noprompt'],
|
29
|
+
deprecateAliases: true,
|
30
|
+
}),
|
31
|
+
};
|
16
32
|
async run() {
|
17
33
|
const { flags } = await this.parse(OrgShapeDeleteCommand);
|
18
34
|
const username = flags['target-org'].getUsername();
|
19
35
|
if (!username)
|
20
|
-
throw new
|
36
|
+
throw new SfError('No username found for target-org');
|
21
37
|
const orgId = flags['target-org'].getOrgId();
|
22
38
|
if (!flags['no-prompt']) {
|
23
39
|
if (!(await this.confirm(messages.getMessage('deleteCommandYesNo', [username])))) {
|
@@ -25,10 +41,10 @@ class OrgShapeDeleteCommand extends sf_plugins_core_1.SfCommand {
|
|
25
41
|
}
|
26
42
|
}
|
27
43
|
const conn = flags['target-org'].getConnection(flags['api-version']);
|
28
|
-
if (!(await
|
44
|
+
if (!(await isShapeEnabled(conn))) {
|
29
45
|
throw messages.createError('noAccess', [username]);
|
30
46
|
}
|
31
|
-
const deleteRes = await
|
47
|
+
const deleteRes = await utils.deleteAll(conn, username);
|
32
48
|
if (deleteRes.shapeIds.length === 0) {
|
33
49
|
this.info(messages.getMessage('noShapesHumanSuccess', [orgId]));
|
34
50
|
return;
|
@@ -59,67 +75,6 @@ class OrgShapeDeleteCommand extends sf_plugins_core_1.SfCommand {
|
|
59
75
|
};
|
60
76
|
}
|
61
77
|
}
|
62
|
-
exports.OrgShapeDeleteCommand = OrgShapeDeleteCommand;
|
63
|
-
OrgShapeDeleteCommand.summary = messages.getMessage('summary');
|
64
|
-
OrgShapeDeleteCommand.description = messages.getMessage('description');
|
65
|
-
OrgShapeDeleteCommand.examples = messages.getMessages('examples');
|
66
|
-
OrgShapeDeleteCommand.aliases = ['force:org:shape:delete'];
|
67
|
-
OrgShapeDeleteCommand.deprecateAliases = true;
|
68
|
-
OrgShapeDeleteCommand.flags = {
|
69
|
-
'target-org': sf_plugins_core_1.requiredOrgFlagWithDeprecations,
|
70
|
-
'api-version': sf_plugins_core_1.orgApiVersionFlagWithDeprecations,
|
71
|
-
loglevel: sf_plugins_core_1.loglevel,
|
72
|
-
'no-prompt': sf_plugins_core_1.Flags.boolean({
|
73
|
-
char: 'p',
|
74
|
-
summary: messages.getMessage('flags.no-prompt.summary'),
|
75
|
-
aliases: ['noprompt'],
|
76
|
-
deprecateAliases: true,
|
77
|
-
}),
|
78
|
-
};
|
79
|
-
/**
|
80
|
-
* Delete all ShapeRepresentation records for the shapeOrg.
|
81
|
-
*
|
82
|
-
* @return List of SR IDs that were deleted
|
83
|
-
*/
|
84
|
-
const deleteAll = async (conn, username) => {
|
85
|
-
let shapeIds = [];
|
86
|
-
const deleteAllResult = {
|
87
|
-
shapeIds: [],
|
88
|
-
failures: [],
|
89
|
-
};
|
90
|
-
try {
|
91
|
-
const result = await conn.query('SELECT Id FROM ShapeRepresentation');
|
92
|
-
if (result.totalSize === 0) {
|
93
|
-
return deleteAllResult;
|
94
|
-
}
|
95
|
-
shapeIds = result.records.map((shape) => shape.Id);
|
96
|
-
}
|
97
|
-
catch (err) {
|
98
|
-
const JsForceErr = err;
|
99
|
-
if (JsForceErr.errorCode && JsForceErr.errorCode === 'INVALID_TYPE') {
|
100
|
-
// ShapeExportPref is not enabled, or user does not have CRUD access
|
101
|
-
throw messages.createError('noAccess', [username]);
|
102
|
-
}
|
103
|
-
// non-access error
|
104
|
-
throw JsForceErr;
|
105
|
-
}
|
106
|
-
await Promise.all(shapeIds.map(async (id) => {
|
107
|
-
try {
|
108
|
-
const delResult = await conn.sobject('ShapeRepresentation').delete(id);
|
109
|
-
if (delResult.success) {
|
110
|
-
deleteAllResult.shapeIds.push(id);
|
111
|
-
}
|
112
|
-
}
|
113
|
-
catch (err) {
|
114
|
-
deleteAllResult.failures.push({
|
115
|
-
shapeId: id,
|
116
|
-
message: err instanceof Error ? err.message : 'error contained no message',
|
117
|
-
});
|
118
|
-
}
|
119
|
-
}));
|
120
|
-
return deleteAllResult;
|
121
|
-
};
|
122
|
-
exports.deleteAll = deleteAll;
|
123
78
|
const setExitCode = (code) => {
|
124
79
|
process.exitCode = code;
|
125
80
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"shape.js","sourceRoot":"","sources":["../../../../src/commands/org/delete/shape.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"shape.js","sourceRoot":"","sources":["../../../../src/commands/org/delete/shape.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EA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Ac,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAC9D,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACb,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;YAC9B,MAAM,OAAO,GAAG;gBACd,OAAO,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE;gBAC/B,OAAO,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE;aACrC,CAAC;YACF,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;SACzC;aAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,KAAK,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;YAClE,WAAW,CAAC,CAAC,CAAC,CAAC;SAChB;aAAM;YACL,WAAW,CAAC,CAAC,CAAC,CAAC;YACf,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAC/D;QAED,OAAO;YACL,KAAK;YACL,QAAQ,EAAE,SAAS,CAAC,QAAQ;YAC5B,QAAQ,EAAE,SAAS,CAAC,QAAQ;SAC7B,CAAC;IACJ,CAAC;;AAGH,MAAM,WAAW,GAAG,CAAC,IAAY,EAAQ,EAAE;IACzC,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;AAC1B,CAAC,CAAC"}
|
@@ -8,10 +8,10 @@ export declare class SnapshotDelete extends SfCommand<SaveResult> {
|
|
8
8
|
static readonly deprecateAliases = true;
|
9
9
|
static readonly state = "closedPilot";
|
10
10
|
static readonly flags: {
|
11
|
-
'target-dev-hub': import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
12
|
-
'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
13
|
-
loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
14
|
-
snapshot: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
11
|
+
'target-dev-hub': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
12
|
+
'api-version': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
13
|
+
loglevel: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
14
|
+
snapshot: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
15
15
|
};
|
16
16
|
run(): Promise<SaveResult>;
|
17
17
|
}
|
@@ -1,26 +1,42 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.SnapshotDelete = void 0;
|
4
1
|
/*
|
5
2
|
* Copyright (c) 2020, salesforce.com, inc.
|
6
3
|
* All rights reserved.
|
7
4
|
* Licensed under the BSD 3-Clause license.
|
8
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
9
6
|
*/
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
7
|
+
import { EOL } from 'node:os';
|
8
|
+
import { dirname } from 'node:path';
|
9
|
+
import { fileURLToPath } from 'node:url';
|
10
|
+
import { Flags, SfCommand, loglevel, orgApiVersionFlagWithDeprecations, requiredHubFlagWithDeprecations, } from '@salesforce/sf-plugins-core';
|
11
|
+
import { Messages } from '@salesforce/core';
|
12
|
+
import { queryByNameOrId } from '../../../shared/snapshot.js';
|
13
|
+
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
|
14
|
+
const messages = Messages.loadMessages('@salesforce/plugin-signups', 'snapshot.delete');
|
16
15
|
// jsforce can return SaveError[] or never[]
|
17
16
|
const isSaveError = (error) => error.message !== undefined;
|
18
|
-
class SnapshotDelete extends
|
17
|
+
export class SnapshotDelete extends SfCommand {
|
18
|
+
static summary = messages.getMessage('summary');
|
19
|
+
static description = messages.getMessage('description');
|
20
|
+
static examples = messages.getMessages('examples');
|
21
|
+
static aliases = ['force:org:snapshot:delete'];
|
22
|
+
static deprecateAliases = true;
|
23
|
+
static state = 'closedPilot';
|
24
|
+
static flags = {
|
25
|
+
'target-dev-hub': requiredHubFlagWithDeprecations,
|
26
|
+
'api-version': orgApiVersionFlagWithDeprecations,
|
27
|
+
loglevel,
|
28
|
+
snapshot: Flags.string({
|
29
|
+
char: 's',
|
30
|
+
summary: messages.getMessage('flags.snapshot.summary'),
|
31
|
+
description: messages.getMessage('flags.snapshot.description'),
|
32
|
+
required: true,
|
33
|
+
}),
|
34
|
+
};
|
19
35
|
async run() {
|
20
36
|
// resolve the query to an ID. This also verifies the snapshot exists in the org
|
21
37
|
const { flags } = await this.parse(SnapshotDelete);
|
22
38
|
const conn = flags['target-dev-hub'].getConnection(flags['api-version']);
|
23
|
-
const result = await
|
39
|
+
const result = await queryByNameOrId(conn, flags.snapshot);
|
24
40
|
const deleteResult = await conn.sobject('OrgSnapshot').delete(result.Id);
|
25
41
|
if (deleteResult.success) {
|
26
42
|
this.logSuccess(messages.getMessage('success', [flags.snapshot]));
|
@@ -29,25 +45,7 @@ class SnapshotDelete extends sf_plugins_core_1.SfCommand {
|
|
29
45
|
throw new Error(deleteResult.errors
|
30
46
|
.filter(isSaveError)
|
31
47
|
.map((error) => error.message)
|
32
|
-
.join(
|
48
|
+
.join(EOL));
|
33
49
|
}
|
34
50
|
}
|
35
|
-
exports.SnapshotDelete = SnapshotDelete;
|
36
|
-
SnapshotDelete.summary = messages.getMessage('summary');
|
37
|
-
SnapshotDelete.description = messages.getMessage('description');
|
38
|
-
SnapshotDelete.examples = messages.getMessages('examples');
|
39
|
-
SnapshotDelete.aliases = ['force:org:snapshot:delete'];
|
40
|
-
SnapshotDelete.deprecateAliases = true;
|
41
|
-
SnapshotDelete.state = 'closedPilot';
|
42
|
-
SnapshotDelete.flags = {
|
43
|
-
'target-dev-hub': sf_plugins_core_1.requiredHubFlagWithDeprecations,
|
44
|
-
'api-version': sf_plugins_core_1.orgApiVersionFlagWithDeprecations,
|
45
|
-
loglevel: sf_plugins_core_1.loglevel,
|
46
|
-
snapshot: sf_plugins_core_1.Flags.string({
|
47
|
-
char: 's',
|
48
|
-
summary: messages.getMessage('flags.snapshot.summary'),
|
49
|
-
description: messages.getMessage('flags.snapshot.description'),
|
50
|
-
required: true,
|
51
|
-
}),
|
52
|
-
};
|
53
51
|
//# sourceMappingURL=snapshot.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../../../src/commands/org/delete/snapshot.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../../../src/commands/org/delete/snapshot.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EACL,KAAK,EACL,SAAS,EACT,QAAQ,EACR,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,QAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1E,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,4BA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AO,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACzE,IAAI,YAAY,CAAC,OAAO,EAAE;YACxB,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAClE,OAAO,YAAY,CAAC;SACrB;QACD,MAAM,IAAI,KAAK,CACb,YAAY,CAAC,MAAM;aAChB,MAAM,CAAC,WAAW,CAAC;aACnB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;aAC7B,IAAI,CAAC,GAAG,CAAC,CACb,CAAC;IACJ,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
2
|
-
import { OrgSnapshot } from '../../../shared/snapshot';
|
2
|
+
import { OrgSnapshot } from '../../../shared/snapshot.js';
|
3
3
|
export declare class SnapshotGet extends SfCommand<OrgSnapshot> {
|
4
4
|
static readonly summary: string;
|
5
5
|
static readonly description: string;
|
@@ -8,10 +8,10 @@ export declare class SnapshotGet extends SfCommand<OrgSnapshot> {
|
|
8
8
|
static readonly deprecateAliases = true;
|
9
9
|
static readonly state = "closedPilot";
|
10
10
|
static readonly flags: {
|
11
|
-
'target-dev-hub': import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
12
|
-
'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
13
|
-
loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
14
|
-
snapshot: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
11
|
+
'target-dev-hub': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
12
|
+
'api-version': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
13
|
+
loglevel: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
14
|
+
snapshot: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
15
15
|
};
|
16
16
|
run(): Promise<OrgSnapshot>;
|
17
17
|
}
|
@@ -1,43 +1,41 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.SnapshotGet = void 0;
|
4
1
|
/*
|
5
2
|
* Copyright (c) 2020, salesforce.com, inc.
|
6
3
|
* All rights reserved.
|
7
4
|
* Licensed under the BSD 3-Clause license.
|
8
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
9
6
|
*/
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
7
|
+
import { dirname } from 'node:path';
|
8
|
+
import { fileURLToPath } from 'node:url';
|
9
|
+
import { Flags, SfCommand, loglevel, requiredHubFlagWithDeprecations, orgApiVersionFlagWithDeprecations, } from '@salesforce/sf-plugins-core';
|
10
|
+
import { Messages } from '@salesforce/core';
|
11
|
+
import { queryByNameOrId, printSingleRecordTable } from '../../../shared/snapshot.js';
|
12
|
+
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
|
13
|
+
const messages = Messages.loadMessages('@salesforce/plugin-signups', 'snapshot.get');
|
14
|
+
export class SnapshotGet extends SfCommand {
|
15
|
+
static summary = messages.getMessage('summary');
|
16
|
+
static description = messages.getMessage('description');
|
17
|
+
static examples = messages.getMessages('examples');
|
18
|
+
static aliases = ['force:org:snapshot:get'];
|
19
|
+
static deprecateAliases = true;
|
20
|
+
static state = 'closedPilot';
|
21
|
+
static flags = {
|
22
|
+
'target-dev-hub': requiredHubFlagWithDeprecations,
|
23
|
+
'api-version': orgApiVersionFlagWithDeprecations,
|
24
|
+
loglevel,
|
25
|
+
snapshot: Flags.string({
|
26
|
+
char: 's',
|
27
|
+
summary: messages.getMessage('flags.snapshot.summary'),
|
28
|
+
description: messages.getMessage('flags.snapshot.description'),
|
29
|
+
required: true,
|
30
|
+
}),
|
31
|
+
};
|
16
32
|
async run() {
|
17
33
|
const { flags } = await this.parse(SnapshotGet);
|
18
|
-
const result = await
|
34
|
+
const result = await queryByNameOrId(flags['target-dev-hub'].getConnection(flags['api-version']), flags.snapshot);
|
19
35
|
if (!this.jsonEnabled()) {
|
20
|
-
|
36
|
+
printSingleRecordTable(result);
|
21
37
|
}
|
22
38
|
return result;
|
23
39
|
}
|
24
40
|
}
|
25
|
-
exports.SnapshotGet = SnapshotGet;
|
26
|
-
SnapshotGet.summary = messages.getMessage('summary');
|
27
|
-
SnapshotGet.description = messages.getMessage('description');
|
28
|
-
SnapshotGet.examples = messages.getMessages('examples');
|
29
|
-
SnapshotGet.aliases = ['force:org:snapshot:get'];
|
30
|
-
SnapshotGet.deprecateAliases = true;
|
31
|
-
SnapshotGet.state = 'closedPilot';
|
32
|
-
SnapshotGet.flags = {
|
33
|
-
'target-dev-hub': sf_plugins_core_1.requiredHubFlagWithDeprecations,
|
34
|
-
'api-version': sf_plugins_core_1.orgApiVersionFlagWithDeprecations,
|
35
|
-
loglevel: sf_plugins_core_1.loglevel,
|
36
|
-
snapshot: sf_plugins_core_1.Flags.string({
|
37
|
-
char: 's',
|
38
|
-
summary: messages.getMessage('flags.snapshot.summary'),
|
39
|
-
description: messages.getMessage('flags.snapshot.description'),
|
40
|
-
required: true,
|
41
|
-
}),
|
42
|
-
};
|
43
41
|
//# sourceMappingURL=snapshot.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../../../src/commands/org/get/snapshot.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../../../src/commands/org/get/snapshot.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EACL,KAAK,EACL,SAAS,EACT,QAAQ,EACR,+BAA+B,EAC/B,iCAAiC,GAClC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAe,eAAe,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAEnG,QAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1E,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,4BAA4B,EAAE,cAAc,CAAC,CAAC;AAErF,MAAM,OAAO,WAAY,SAAQ,SAAsB;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,WAAW,CAAC,UAAU,CAAC,CAAC;IAC5D,MAAM,CAAU,OAAO,GAAG,CAAC,wBAAwB,CAAC,CAAC;IACrD,MAAM,CAAU,gBAAgB,GAAG,IAAI,CAAC;IACxC,MAAM,CAAU,KAAK,GAAG,aAAa,CAAC;IAEtC,MAAM,CAAU,KAAK,GAAG;QAC7B,gBAAgB,EAAE,+BAA+B;QACjD,aAAa,EAAE,iCAAiC;QAChD,QAAQ;QACR,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC;YACrB,IAAI,EAAE,GAAG;YACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAAC;YACtD,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,4BAA4B,CAAC;YAC9D,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAChD,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;QAClH,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE;YACvB,sBAAsB,CAAC,MAAM,CAAC,CAAC;SAChC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
2
|
-
import { OrgShapeListResult } from '../../../shared/orgShapeListUtils';
|
2
|
+
import { OrgShapeListResult } from '../../../shared/orgShapeListUtils.js';
|
3
3
|
export declare class OrgShapeListCommand extends SfCommand<OrgShapeListResult[]> {
|
4
4
|
static readonly summary: string;
|
5
5
|
static readonly description: string;
|
@@ -7,12 +7,8 @@ export declare class OrgShapeListCommand extends SfCommand<OrgShapeListResult[]>
|
|
7
7
|
static readonly aliases: string[];
|
8
8
|
static readonly deprecateAliases = true;
|
9
9
|
static readonly flags: {
|
10
|
-
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
11
|
-
loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
10
|
+
verbose: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
11
|
+
loglevel: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
12
12
|
};
|
13
13
|
run(): Promise<OrgShapeListResult[]>;
|
14
14
|
}
|
15
|
-
export declare const getAllOrgShapesFromAuthenticatedOrgs: () => Promise<{
|
16
|
-
orgShapes: OrgShapeListResult[];
|
17
|
-
errors: Error[];
|
18
|
-
}>;
|
@@ -1,19 +1,17 @@
|
|
1
|
-
"use strict";
|
2
1
|
/*
|
3
2
|
* Copyright (c) 2022, salesforce.com, inc.
|
4
3
|
* All rights reserved.
|
5
4
|
* Licensed under the BSD 3-Clause license.
|
6
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
7
6
|
*/
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
const messages = core_1.Messages.loadMessages('@salesforce/plugin-signups', 'shape.list');
|
7
|
+
import { dirname } from 'node:path';
|
8
|
+
import { fileURLToPath } from 'node:url';
|
9
|
+
import { Flags, loglevel, SfCommand } from '@salesforce/sf-plugins-core';
|
10
|
+
import { Messages } from '@salesforce/core';
|
11
|
+
import chalk from 'chalk';
|
12
|
+
import utils from '../../../shared/orgShapeListUtils.js';
|
13
|
+
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
|
14
|
+
const messages = Messages.loadMessages('@salesforce/plugin-signups', 'shape.list');
|
17
15
|
// default columns for the shape list
|
18
16
|
const orgShapeColumns = {
|
19
17
|
alias: {
|
@@ -26,11 +24,23 @@ const orgShapeColumns = {
|
|
26
24
|
createdBy: { header: 'CREATED BY' },
|
27
25
|
createdDate: { header: 'CREATED DATE' },
|
28
26
|
};
|
29
|
-
class OrgShapeListCommand extends
|
27
|
+
export class OrgShapeListCommand extends SfCommand {
|
28
|
+
static summary = messages.getMessage('summary');
|
29
|
+
static description = messages.getMessage('description');
|
30
|
+
static examples = messages.getMessages('examples');
|
31
|
+
static aliases = ['force:org:shape:list'];
|
32
|
+
static deprecateAliases = true;
|
33
|
+
static flags = {
|
34
|
+
verbose: Flags.boolean({
|
35
|
+
summary: messages.getMessage('flags.verbose.summary'),
|
36
|
+
hidden: true,
|
37
|
+
}),
|
38
|
+
loglevel,
|
39
|
+
};
|
30
40
|
// there were no flags being used in the original!
|
31
41
|
// eslint-disable-next-line sf-plugin/should-parse-flags
|
32
42
|
async run() {
|
33
|
-
const { orgShapes, errors } = await
|
43
|
+
const { orgShapes, errors } = await utils.getAllOrgShapesFromAuthenticatedOrgs();
|
34
44
|
errors.forEach((e) => this.warn(e));
|
35
45
|
if (orgShapes.length === 0) {
|
36
46
|
this.log();
|
@@ -42,26 +52,4 @@ class OrgShapeListCommand extends sf_plugins_core_1.SfCommand {
|
|
42
52
|
return orgShapes;
|
43
53
|
}
|
44
54
|
}
|
45
|
-
exports.OrgShapeListCommand = OrgShapeListCommand;
|
46
|
-
OrgShapeListCommand.summary = messages.getMessage('summary');
|
47
|
-
OrgShapeListCommand.description = messages.getMessage('description');
|
48
|
-
OrgShapeListCommand.examples = messages.getMessages('examples');
|
49
|
-
OrgShapeListCommand.aliases = ['force:org:shape:list'];
|
50
|
-
OrgShapeListCommand.deprecateAliases = true;
|
51
|
-
OrgShapeListCommand.flags = {
|
52
|
-
verbose: sf_plugins_core_1.Flags.boolean({
|
53
|
-
summary: messages.getMessage('flags.verbose.summary'),
|
54
|
-
hidden: true,
|
55
|
-
}),
|
56
|
-
loglevel: sf_plugins_core_1.loglevel,
|
57
|
-
};
|
58
|
-
const getAllOrgShapesFromAuthenticatedOrgs = async () => {
|
59
|
-
const orgs = await core_1.AuthInfo.listAllAuthorizations((orgAuth) => !orgAuth.error && !orgAuth.isScratchOrg);
|
60
|
-
if (orgs.length === 0) {
|
61
|
-
throw messages.createError('noAuthFound');
|
62
|
-
}
|
63
|
-
const shapes = await (0, kit_1.settleAll)(orgs.map((o) => (0, orgShapeListUtils_1.getAllShapesFromOrg)(o)));
|
64
|
-
return { orgShapes: shapes.fulfilled.flat(), errors: shapes.rejected };
|
65
|
-
};
|
66
|
-
exports.getAllOrgShapesFromAuthenticatedOrgs = getAllOrgShapesFromAuthenticatedOrgs;
|
67
55
|
//# sourceMappingURL=shape.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"shape.js","sourceRoot":"","sources":["../../../../src/commands/org/list/shape.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"shape.js","sourceRoot":"","sources":["../../../../src/commands/org/list/shape.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAA6B,MAAM,sCAAsC,CAAC;AAEjF,QAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1E,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,4BAA4B,EAAE,YAAY,CAAC,CAAC;AAEnF,qCAAqC;AACrC,MAAM,eAAe,GAAG;IACtB,KAAK,EAAE;QACL,MAAM,EAAE,OAAO;QACf,GAAG,EAAE,CAAC,IAAwB,EAAU,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE;KAC5D;IACD,QAAQ,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE;IAChC,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;IAC3B,MAAM,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE;IAClC,SAAS,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE;IACnC,WAAW,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE;CACxC,CAA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KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAC/G,eAAe,CAChB,CAAC;QACF,OAAO,SAAS,CAAC;IACnB,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
2
|
-
import { OrgSnapshot } from '../../../shared/snapshot';
|
2
|
+
import { OrgSnapshot } from '../../../shared/snapshot.js';
|
3
3
|
export declare class SnapshotList extends SfCommand<OrgSnapshot[]> {
|
4
4
|
static readonly summary: string;
|
5
5
|
static readonly description: string;
|
@@ -8,9 +8,9 @@ export declare class SnapshotList extends SfCommand<OrgSnapshot[]> {
|
|
8
8
|
static readonly deprecateAliases = true;
|
9
9
|
static readonly state = "closedPilot";
|
10
10
|
static readonly flags: {
|
11
|
-
'target-dev-hub': import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
12
|
-
'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
13
|
-
loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
11
|
+
'target-dev-hub': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
12
|
+
'api-version': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
13
|
+
loglevel: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
14
14
|
};
|
15
15
|
run(): Promise<OrgSnapshot[]>;
|
16
16
|
}
|
@@ -1,37 +1,35 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.SnapshotList = void 0;
|
4
1
|
/*
|
5
2
|
* Copyright (c) 2020, salesforce.com, inc.
|
6
3
|
* All rights reserved.
|
7
4
|
* Licensed under the BSD 3-Clause license.
|
8
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
9
6
|
*/
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
7
|
+
import { dirname } from 'node:path';
|
8
|
+
import { fileURLToPath } from 'node:url';
|
9
|
+
import { loglevel, orgApiVersionFlagWithDeprecations, requiredHubFlagWithDeprecations, SfCommand, } from '@salesforce/sf-plugins-core';
|
10
|
+
import { Messages } from '@salesforce/core';
|
11
|
+
import { queryAll, printRecordTable } from '../../../shared/snapshot.js';
|
12
|
+
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
|
13
|
+
const messages = Messages.loadMessages('@salesforce/plugin-signups', 'snapshot.list');
|
14
|
+
export class SnapshotList extends SfCommand {
|
15
|
+
static summary = messages.getMessage('summary');
|
16
|
+
static description = messages.getMessage('description');
|
17
|
+
static examples = messages.getMessages('examples');
|
18
|
+
static aliases = ['force:org:snapshot:list'];
|
19
|
+
static deprecateAliases = true;
|
20
|
+
static state = 'closedPilot';
|
21
|
+
static flags = {
|
22
|
+
'target-dev-hub': requiredHubFlagWithDeprecations,
|
23
|
+
'api-version': orgApiVersionFlagWithDeprecations,
|
24
|
+
loglevel,
|
25
|
+
};
|
16
26
|
async run() {
|
17
27
|
const { flags } = await this.parse(SnapshotList);
|
18
|
-
const results = await
|
28
|
+
const results = await queryAll(flags['target-dev-hub'].getConnection(flags['api-version']));
|
19
29
|
if (!this.jsonEnabled()) {
|
20
|
-
|
30
|
+
printRecordTable(results);
|
21
31
|
}
|
22
32
|
return results;
|
23
33
|
}
|
24
34
|
}
|
25
|
-
exports.SnapshotList = SnapshotList;
|
26
|
-
SnapshotList.summary = messages.getMessage('summary');
|
27
|
-
SnapshotList.description = messages.getMessage('description');
|
28
|
-
SnapshotList.examples = messages.getMessages('examples');
|
29
|
-
SnapshotList.aliases = ['force:org:snapshot:list'];
|
30
|
-
SnapshotList.deprecateAliases = true;
|
31
|
-
SnapshotList.state = 'closedPilot';
|
32
|
-
SnapshotList.flags = {
|
33
|
-
'target-dev-hub': sf_plugins_core_1.requiredHubFlagWithDeprecations,
|
34
|
-
'api-version': sf_plugins_core_1.orgApiVersionFlagWithDeprecations,
|
35
|
-
loglevel: sf_plugins_core_1.loglevel,
|
36
|
-
};
|
37
35
|
//# sourceMappingURL=snapshot.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../../../src/commands/org/list/snapshot.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../../../src/commands/org/list/snapshot.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EACL,QAAQ,EACR,iCAAiC,EACjC,+BAA+B,EAC/B,SAAS,GACV,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAe,QAAQ,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEtF,QAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1E,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,4BAA4B,EAAE,eAAe,CAAC,CAAC;AAEtF,MAAM,OAAO,YAAa,SAAQ,SAAwB;IACjD,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,WAAW,CAAC,UAAU,CAAC,CAAC;IAC5D,MAAM,CAAU,OAAO,GAAG,CAAC,yBAAyB,CAAC,CAAC;IACtD,MAAM,CAAU,gBAAgB,GAAG,IAAI,CAAC;IACxC,MAAM,CAAU,KAAK,GAAG,aAAa,CAAC;IACtC,MAAM,CAAU,KAAK,GAAG;QAC7B,gBAAgB,EAAE,+BAA+B;QACjD,aAAa,EAAE,iCAAiC;QAChD,QAAQ;KACT,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACjD,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QAC5F,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE;YACvB,gBAAgB,CAAC,OAAO,CAAC,CAAC;SAC3B;QACD,OAAO,OAAO,CAAC;IACjB,CAAC"}
|
package/lib/index.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
declare const _default: {};
|
2
|
-
export
|
2
|
+
export default _default;
|
package/lib/index.js
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
"use strict";
|
2
1
|
/*
|
3
2
|
* Copyright (c) 2021, salesforce.com, inc.
|
4
3
|
* All rights reserved.
|
5
4
|
* Licensed under the BSD 3-Clause license.
|
6
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
7
6
|
*/
|
8
|
-
|
7
|
+
export default {};
|
9
8
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe,EAAE,CAAC"}
|