oclif 4.21.2 → 4.22.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/promote.js
CHANGED
|
@@ -86,8 +86,8 @@ class Promote extends core_1.Command {
|
|
|
86
86
|
CacheControl: indexDefaults.maxAge,
|
|
87
87
|
MetadataDirective: client_s3_1.MetadataDirective.REPLACE,
|
|
88
88
|
};
|
|
89
|
-
const cloudBucketCommitKey = (shortKey) => node_path_1.default.join(s3Config.bucket, (0, upload_util_1.commitAWSDir)(flags.version, flags.sha, s3Config), shortKey);
|
|
90
|
-
const cloudChannelKey = (shortKey) => node_path_1.default.join((0, upload_util_1.channelAWSDir)(flags.channel, s3Config), shortKey);
|
|
89
|
+
const cloudBucketCommitKey = (shortKey) => node_path_1.default.posix.join(s3Config.bucket, (0, upload_util_1.commitAWSDir)(flags.version, flags.sha, s3Config), shortKey);
|
|
90
|
+
const cloudChannelKey = (shortKey) => node_path_1.default.posix.join((0, upload_util_1.channelAWSDir)(flags.channel, s3Config), shortKey);
|
|
91
91
|
// copy tarballs manifests
|
|
92
92
|
const promoteManifest = async (target) => {
|
|
93
93
|
const manifest = (0, upload_util_1.templateShortKey)('manifest', {
|
|
@@ -56,8 +56,6 @@ class UploadTarballs extends core_1.Command {
|
|
|
56
56
|
};
|
|
57
57
|
async run() {
|
|
58
58
|
const { flags } = await this.parse(UploadTarballs);
|
|
59
|
-
if (process.platform === 'win32')
|
|
60
|
-
throw new Error('upload does not function on windows');
|
|
61
59
|
const buildConfig = await Tarballs.buildConfig(flags.root, {
|
|
62
60
|
sha: flags?.sha,
|
|
63
61
|
targets: flags?.targets?.split(','),
|
package/lib/upload-util.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.commitAWSDir = commitAWSDir;
|
|
4
7
|
exports.channelAWSDir = channelAWSDir;
|
|
@@ -6,18 +9,18 @@ exports.templateShortKey = templateShortKey;
|
|
|
6
9
|
exports.debArch = debArch;
|
|
7
10
|
exports.debVersion = debVersion;
|
|
8
11
|
const ejs_1 = require("ejs");
|
|
9
|
-
const node_path_1 = require("node:path");
|
|
12
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
10
13
|
function commitAWSDir(version, sha, s3Config) {
|
|
11
14
|
let s3SubDir = s3Config.folder || '';
|
|
12
15
|
if (s3SubDir !== '' && s3SubDir.slice(-1) !== '/')
|
|
13
16
|
s3SubDir = `${s3SubDir}/`;
|
|
14
|
-
return
|
|
17
|
+
return node_path_1.default.posix.join(s3SubDir, 'versions', version, sha);
|
|
15
18
|
}
|
|
16
19
|
function channelAWSDir(channel, s3Config) {
|
|
17
20
|
let s3SubDir = s3Config.folder || '';
|
|
18
21
|
if (s3SubDir !== '' && s3SubDir.slice(-1) !== '/')
|
|
19
22
|
s3SubDir = `${s3SubDir}/`;
|
|
20
|
-
return
|
|
23
|
+
return node_path_1.default.posix.join(s3SubDir, 'channels', channel);
|
|
21
24
|
}
|
|
22
25
|
// TODO: refactor this key name lookup helper to oclif/core
|
|
23
26
|
function templateShortKey(type, options) {
|
package/lib/version-indexes.js
CHANGED
|
@@ -81,7 +81,7 @@ const appendToIndex = async (input) => {
|
|
|
81
81
|
// json-friendly filenames like sfdx-linux-x64-tar-gz
|
|
82
82
|
const jsonFileName = `${filename.replaceAll('.', '-')}.json`;
|
|
83
83
|
// folder is optional, but honored if present
|
|
84
|
-
const key = node_path_1.default.join(s3Config.folder ?? '', 'versions', jsonFileName);
|
|
84
|
+
const key = node_path_1.default.posix.join(s3Config.folder ?? '', 'versions', jsonFileName);
|
|
85
85
|
// retrieve existing index file
|
|
86
86
|
let existing = {};
|
|
87
87
|
try {
|
package/oclif.manifest.json
CHANGED