@salesforce/core 6.5.5 → 6.6.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/config/config.js +24 -1
- package/lib/config/configFile.js +24 -1
- package/lib/config/sandboxProcessCache.d.ts +2 -1
- package/lib/crypto/crypto.js +25 -2
- package/lib/crypto/keyChainImpl.js +28 -5
- package/lib/crypto/secureBuffer.js +24 -1
- package/lib/deviceOauthService.js +7 -4
- package/lib/exported.d.ts +1 -1
- package/lib/global.js +26 -3
- package/lib/lifecycleEvents.js +24 -1
- package/lib/logger/cleanup.js +24 -1
- package/lib/logger/logger.js +25 -2
- package/lib/messageTransformer.js +24 -1
- package/lib/messages.js +27 -4
- package/lib/org/authInfo.js +30 -4
- package/lib/org/org.d.ts +32 -2
- package/lib/org/org.js +102 -12
- package/lib/org/scratchOrgCreate.js +4 -1
- package/lib/org/scratchOrgInfoApi.js +4 -1
- package/lib/org/scratchOrgSettingsGenerator.js +25 -2
- package/lib/schema/validator.js +29 -3
- package/lib/sfProject.js +24 -1
- package/lib/stateAggregator/accessors/orgAccessor.js +25 -2
- package/lib/status/streamingClient.js +7 -4
- package/lib/testSetup.js +25 -2
- package/lib/util/directoryWriter.js +26 -3
- package/lib/util/fileLocking.js +24 -1
- package/lib/util/internal.js +24 -1
- package/lib/util/uniqid.js +24 -1
- package/lib/util/zipWriter.js +5 -2
- package/lib/webOAuthServer.js +24 -1
- package/messages/org.md +4 -0
- package/package.json +2 -2
package/lib/config/config.js
CHANGED
|
@@ -5,10 +5,33 @@
|
|
|
5
5
|
* Licensed under the BSD 3-Clause license.
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
8
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
32
|
exports.Config = exports.SfProperty = exports.SFDX_ALLOWED_PROPERTIES = exports.SfdxPropertyKeys = exports.SF_ALLOWED_PROPERTIES = exports.SfConfigProperties = void 0;
|
|
10
33
|
const node_path_1 = require("node:path");
|
|
11
|
-
const fs = require("node:fs");
|
|
34
|
+
const fs = __importStar(require("node:fs"));
|
|
12
35
|
const kit_1 = require("@salesforce/kit");
|
|
13
36
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
14
37
|
const global_1 = require("../global");
|
package/lib/config/configFile.js
CHANGED
|
@@ -5,9 +5,32 @@
|
|
|
5
5
|
* Licensed under the BSD 3-Clause license.
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
8
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
32
|
exports.ConfigFile = void 0;
|
|
10
|
-
const fs = require("node:fs");
|
|
33
|
+
const fs = __importStar(require("node:fs"));
|
|
11
34
|
const node_fs_1 = require("node:fs");
|
|
12
35
|
const node_os_1 = require("node:os");
|
|
13
36
|
const node_path_1 = require("node:path");
|
|
@@ -2,8 +2,9 @@ import { SandboxProcessObject, SandboxRequest } from '../org/org';
|
|
|
2
2
|
import { TTLConfig } from './ttlConfig';
|
|
3
3
|
export type SandboxRequestCacheEntry = {
|
|
4
4
|
alias?: string;
|
|
5
|
-
setDefault
|
|
5
|
+
setDefault?: boolean;
|
|
6
6
|
prodOrgUsername: string;
|
|
7
|
+
action: 'Create' | 'Refresh';
|
|
7
8
|
sandboxProcessObject: Partial<SandboxProcessObject>;
|
|
8
9
|
sandboxRequest: Partial<SandboxRequest>;
|
|
9
10
|
tracksSource?: boolean;
|
package/lib/crypto/crypto.js
CHANGED
|
@@ -6,10 +6,33 @@
|
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
8
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
9
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
33
|
exports.Crypto = void 0;
|
|
11
|
-
const crypto = require("node:crypto");
|
|
12
|
-
const os = require("node:os");
|
|
34
|
+
const crypto = __importStar(require("node:crypto"));
|
|
35
|
+
const os = __importStar(require("node:os"));
|
|
13
36
|
const node_path_1 = require("node:path");
|
|
14
37
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
15
38
|
const kit_1 = require("@salesforce/kit");
|
|
@@ -5,14 +5,37 @@
|
|
|
5
5
|
* Licensed under the BSD 3-Clause license.
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
8
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
32
|
exports.keyChainImpl = exports.GenericWindowsKeychainAccess = exports.GenericUnixKeychainAccess = exports.GenericKeychainAccess = exports.KeychainAccess = void 0;
|
|
10
|
-
const childProcess = require("node:child_process");
|
|
11
|
-
const nodeFs = require("node:fs");
|
|
12
|
-
const fs = require("node:fs");
|
|
13
|
-
const os = require("node:os");
|
|
33
|
+
const childProcess = __importStar(require("node:child_process"));
|
|
34
|
+
const nodeFs = __importStar(require("node:fs"));
|
|
35
|
+
const fs = __importStar(require("node:fs"));
|
|
36
|
+
const os = __importStar(require("node:os"));
|
|
14
37
|
const node_os_1 = require("node:os");
|
|
15
|
-
const path = require("node:path");
|
|
38
|
+
const path = __importStar(require("node:path"));
|
|
16
39
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
17
40
|
const kit_1 = require("@salesforce/kit");
|
|
18
41
|
const global_1 = require("../global");
|
|
@@ -5,9 +5,32 @@
|
|
|
5
5
|
* Licensed under the BSD 3-Clause license.
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
8
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
32
|
exports.SecureBuffer = void 0;
|
|
10
|
-
const crypto = require("node:crypto");
|
|
33
|
+
const crypto = __importStar(require("node:crypto"));
|
|
11
34
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
12
35
|
const cipherName = 'aes-256-cbc';
|
|
13
36
|
const cipherSize = 32;
|
|
@@ -7,12 +7,15 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/* eslint-disable camelcase */
|
|
9
9
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
10
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
11
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12
|
+
};
|
|
10
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
14
|
exports.DeviceOauthService = void 0;
|
|
12
|
-
const transport_1 = require("jsforce/lib/transport");
|
|
15
|
+
const transport_1 = __importDefault(require("jsforce/lib/transport"));
|
|
13
16
|
const kit_1 = require("@salesforce/kit");
|
|
14
17
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
15
|
-
const
|
|
18
|
+
const form_data_1 = __importDefault(require("form-data"));
|
|
16
19
|
const logger_1 = require("./logger/logger");
|
|
17
20
|
const authInfo_1 = require("./org/authInfo");
|
|
18
21
|
const connection_1 = require("./org/connection");
|
|
@@ -109,7 +112,7 @@ class DeviceOauthService extends kit_1.AsyncCreatable {
|
|
|
109
112
|
this.logger.debug(`this.options.loginUrl: ${this.options.loginUrl}`);
|
|
110
113
|
}
|
|
111
114
|
getLoginOptions(url) {
|
|
112
|
-
const form = new
|
|
115
|
+
const form = new form_data_1.default();
|
|
113
116
|
form.append('client_id', (0, ts_types_1.ensureString)(this.options.clientId));
|
|
114
117
|
form.append('response_type', DeviceOauthService.RESPONSE_TYPE);
|
|
115
118
|
form.append('scope', DeviceOauthService.SCOPE);
|
|
@@ -121,7 +124,7 @@ class DeviceOauthService extends kit_1.AsyncCreatable {
|
|
|
121
124
|
};
|
|
122
125
|
}
|
|
123
126
|
getPollingOptions(url, code) {
|
|
124
|
-
const form = new
|
|
127
|
+
const form = new form_data_1.default();
|
|
125
128
|
form.append('client_id', (0, ts_types_1.ensureString)(this.options.clientId));
|
|
126
129
|
form.append('grant_type', DeviceOauthService.GRANT_TYPE);
|
|
127
130
|
form.append('code', code);
|
package/lib/exported.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export { SfdcUrl } from './util/sfdcUrl';
|
|
|
20
20
|
export { getJwtAudienceUrl } from './util/getJwtAudienceUrl';
|
|
21
21
|
export { Fields, FieldValue, LoggerLevel, LoggerLevelValue, LogLine, LoggerOptions, Logger } from './logger/logger';
|
|
22
22
|
export { Messages, StructuredMessage } from './messages';
|
|
23
|
-
export { Org, SandboxProcessObject, StatusEvent, SandboxEvents, SandboxUserAuthResponse, SandboxUserAuthRequest, SandboxRequest, ResumeSandboxRequest, OrgTypes, ResultEvent, ScratchOrgRequest, } from './org/org';
|
|
23
|
+
export { Org, SandboxProcessObject, StatusEvent, SandboxInfo, SandboxEvents, SandboxUserAuthResponse, SandboxUserAuthRequest, SandboxRequest, ResumeSandboxRequest, OrgTypes, ResultEvent, ScratchOrgRequest, } from './org/org';
|
|
24
24
|
export { OrgConfigProperties, ORG_CONFIG_ALLOWED_PROPERTIES } from './org/orgConfigProperties';
|
|
25
25
|
export { PackageDir, NamedPackageDir, PackageDirDependency, SfProject, SfProjectJson } from './sfProject';
|
|
26
26
|
export { SchemaValidator } from './schema/validator';
|
package/lib/global.js
CHANGED
|
@@ -5,11 +5,34 @@
|
|
|
5
5
|
* Licensed under the BSD 3-Clause license.
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
8
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
32
|
exports.Global = exports.Mode = void 0;
|
|
10
|
-
const fs = require("node:fs");
|
|
11
|
-
const os = require("node:os");
|
|
12
|
-
const path = require("node:path");
|
|
33
|
+
const fs = __importStar(require("node:fs"));
|
|
34
|
+
const os = __importStar(require("node:os"));
|
|
35
|
+
const path = __importStar(require("node:path"));
|
|
13
36
|
const kit_1 = require("@salesforce/kit");
|
|
14
37
|
const sfError_1 = require("./sfError");
|
|
15
38
|
/**
|
package/lib/lifecycleEvents.js
CHANGED
|
@@ -5,13 +5,36 @@
|
|
|
5
5
|
* Licensed under the BSD 3-Clause license.
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
8
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
32
|
exports.Lifecycle = void 0;
|
|
10
33
|
const semver_1 = require("semver");
|
|
11
34
|
// needed for TS to not put everything inside /lib/src
|
|
12
35
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
13
36
|
// @ts-ignore
|
|
14
|
-
const pjson = require("../package.json");
|
|
37
|
+
const pjson = __importStar(require("../package.json"));
|
|
15
38
|
const logger_1 = require("./logger/logger");
|
|
16
39
|
/**
|
|
17
40
|
* An asynchronous event listener and emitter that follows the singleton pattern. The singleton pattern allows lifecycle
|
package/lib/logger/cleanup.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.getOldLogFiles = exports.cleanup = void 0;
|
|
4
27
|
/*
|
|
@@ -7,7 +30,7 @@ exports.getOldLogFiles = exports.cleanup = void 0;
|
|
|
7
30
|
* Licensed under the BSD 3-Clause license.
|
|
8
31
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
32
|
*/
|
|
10
|
-
const fs = require("node:fs");
|
|
33
|
+
const fs = __importStar(require("node:fs"));
|
|
11
34
|
const node_path_1 = require("node:path");
|
|
12
35
|
const global_1 = require("../global");
|
|
13
36
|
const logger_1 = require("./logger");
|
package/lib/logger/logger.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.computeLevel = exports.Logger = exports.LoggerLevel = void 0;
|
|
4
27
|
/*
|
|
@@ -7,8 +30,8 @@ exports.computeLevel = exports.Logger = exports.LoggerLevel = void 0;
|
|
|
7
30
|
* Licensed under the BSD 3-Clause license.
|
|
8
31
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
32
|
*/
|
|
10
|
-
const os = require("node:os");
|
|
11
|
-
const path = require("node:path");
|
|
33
|
+
const os = __importStar(require("node:os"));
|
|
34
|
+
const path = __importStar(require("node:path"));
|
|
12
35
|
const pino_1 = require("pino");
|
|
13
36
|
const kit_1 = require("@salesforce/kit");
|
|
14
37
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
@@ -5,9 +5,32 @@
|
|
|
5
5
|
* Licensed under the BSD 3-Clause license.
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
8
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
32
|
exports.messageTransformer = void 0;
|
|
10
|
-
const ts = require("typescript");
|
|
33
|
+
const ts = __importStar(require("typescript"));
|
|
11
34
|
const messages_1 = require("./messages");
|
|
12
35
|
/**
|
|
13
36
|
*
|
package/lib/messages.js
CHANGED
|
@@ -5,12 +5,35 @@
|
|
|
5
5
|
* Licensed under the BSD 3-Clause license.
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
8
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
32
|
exports.Messages = void 0;
|
|
10
|
-
const fs = require("node:fs");
|
|
11
|
-
const os = require("node:os");
|
|
12
|
-
const path = require("node:path");
|
|
13
|
-
const util = require("node:util");
|
|
33
|
+
const fs = __importStar(require("node:fs"));
|
|
34
|
+
const os = __importStar(require("node:os"));
|
|
35
|
+
const path = __importStar(require("node:path"));
|
|
36
|
+
const util = __importStar(require("node:util"));
|
|
14
37
|
const node_url_1 = require("node:url");
|
|
15
38
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
16
39
|
const kit_1 = require("@salesforce/kit");
|
package/lib/org/authInfo.js
CHANGED
|
@@ -6,17 +6,43 @@
|
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
8
|
/* eslint-disable class-methods-use-this */
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
33
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
|
+
};
|
|
9
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
36
|
exports.AuthInfo = exports.DEFAULT_CONNECTED_APP_INFO = void 0;
|
|
11
37
|
const node_crypto_1 = require("node:crypto");
|
|
12
38
|
const node_path_1 = require("node:path");
|
|
13
|
-
const os = require("node:os");
|
|
14
|
-
const fs = require("node:fs");
|
|
39
|
+
const os = __importStar(require("node:os"));
|
|
40
|
+
const fs = __importStar(require("node:fs"));
|
|
15
41
|
const kit_1 = require("@salesforce/kit");
|
|
16
42
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
17
43
|
const jsforce_1 = require("jsforce");
|
|
18
|
-
const transport_1 = require("jsforce/lib/transport");
|
|
19
|
-
const jwt = require("jsonwebtoken");
|
|
44
|
+
const transport_1 = __importDefault(require("jsforce/lib/transport"));
|
|
45
|
+
const jwt = __importStar(require("jsonwebtoken"));
|
|
20
46
|
const config_1 = require("../config/config");
|
|
21
47
|
const configAggregator_1 = require("../config/configAggregator");
|
|
22
48
|
const logger_1 = require("../logger/logger");
|
package/lib/org/org.d.ts
CHANGED
|
@@ -71,6 +71,24 @@ export type ResumeSandboxRequest = {
|
|
|
71
71
|
SandboxName?: string;
|
|
72
72
|
SandboxProcessObjId?: string;
|
|
73
73
|
};
|
|
74
|
+
export type SandboxInfo = {
|
|
75
|
+
Id: string;
|
|
76
|
+
IsDeleted: boolean;
|
|
77
|
+
CreatedDate: string;
|
|
78
|
+
CreatedById: string;
|
|
79
|
+
LastModifiedDate: string;
|
|
80
|
+
LastModifiedById: string;
|
|
81
|
+
SandboxName: string;
|
|
82
|
+
LicenseType: 'DEVELOPER' | 'DEVELOPER PRO' | 'PARTIAL' | 'FULL';
|
|
83
|
+
TemplateId?: string;
|
|
84
|
+
HistoryDays: -1 | 0 | 10 | 20 | 30 | 60 | 90 | 120 | 150 | 180;
|
|
85
|
+
CopyChatter: boolean;
|
|
86
|
+
AutoActivate: boolean;
|
|
87
|
+
ApexClassId?: string;
|
|
88
|
+
Description?: string;
|
|
89
|
+
SourceId?: string;
|
|
90
|
+
CopyArchivedActivities?: boolean;
|
|
91
|
+
};
|
|
74
92
|
export type ScratchOrgRequest = Omit<ScratchOrgCreateOptions, 'hubOrg'>;
|
|
75
93
|
export type SandboxFields = {
|
|
76
94
|
sandboxOrgId: string;
|
|
@@ -130,6 +148,18 @@ export declare class Org extends AsyncOptionalCreatable<Org.Options> {
|
|
|
130
148
|
interval?: Duration;
|
|
131
149
|
async?: boolean;
|
|
132
150
|
}): Promise<SandboxProcessObject>;
|
|
151
|
+
/**
|
|
152
|
+
* Refresh (update) a sandbox from a production org.
|
|
153
|
+
* 'this' needs to be a production org with sandbox licenses available
|
|
154
|
+
*
|
|
155
|
+
* @param sandboxInfo SandboxInfo to update the sandbox with
|
|
156
|
+
* @param options Wait: The amount of time to wait before timing out, Interval: The time interval between polling
|
|
157
|
+
*/
|
|
158
|
+
refreshSandbox(sandboxInfo: SandboxInfo, options?: {
|
|
159
|
+
wait?: Duration;
|
|
160
|
+
interval?: Duration;
|
|
161
|
+
async?: boolean;
|
|
162
|
+
}): Promise<SandboxProcessObject>;
|
|
133
163
|
/**
|
|
134
164
|
*
|
|
135
165
|
* @param sandboxReq SandboxRequest options to create the sandbox with
|
|
@@ -142,10 +172,10 @@ export declare class Org extends AsyncOptionalCreatable<Org.Options> {
|
|
|
142
172
|
interval?: Duration;
|
|
143
173
|
}): Promise<SandboxProcessObject>;
|
|
144
174
|
/**
|
|
145
|
-
* Resume a sandbox
|
|
175
|
+
* Resume a sandbox create or refresh from a production org.
|
|
146
176
|
* `this` needs to be a production org with sandbox licenses available.
|
|
147
177
|
*
|
|
148
|
-
* @param resumeSandboxRequest SandboxRequest options to create the sandbox with
|
|
178
|
+
* @param resumeSandboxRequest SandboxRequest options to create/refresh the sandbox with
|
|
149
179
|
* @param options Wait: The amount of time to wait (default: 0 minutes) before timing out,
|
|
150
180
|
* Interval: The time interval (default: 30 seconds) between polling
|
|
151
181
|
*/
|