oclif 4.21.2 → 4.22.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 CHANGED
@@ -111,7 +111,7 @@ hello world! (./src/commands/hello/world.ts)
111
111
 
112
112
  # 🚀 Contributing
113
113
 
114
- See the [contributing guide](./CONRTIBUTING.md).
114
+ See the [contributing guide](./CONTRIBUTING.md).
115
115
 
116
116
  # 🏭 Related Repositories
117
117
 
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const core_1 = require("@oclif/core");
7
+ const errors_1 = require("@oclif/core/errors");
7
8
  const ansis_1 = require("ansis");
8
9
  const node_fs_1 = require("node:fs");
9
10
  const promises_1 = require("node:fs/promises");
@@ -247,8 +248,22 @@ Head to oclif.io/docs/introduction to learn more about building CLIs with oclif.
247
248
  exports.default = Generate;
248
249
  const findEjsFiles = (location) => async (dir) => (await (0, promises_1.readdir)(dir, { recursive: true, withFileTypes: true }))
249
250
  .filter((f) => f.isFile() && f.name.endsWith('.ejs'))
250
- .map((f) => ({
251
- destination: (0, node_path_1.join)(f.path.replace(dir, location), f.name.replace('.ejs', '')),
252
- name: f.name,
253
- src: (0, node_path_1.join)(f.path, f.name),
254
- }));
251
+ .map((f) => {
252
+ debug({
253
+ location,
254
+ name: f.name,
255
+ parentPath: f.parentPath,
256
+ path: f.path,
257
+ });
258
+ const path = f.path ?? f.parentPath;
259
+ if (!path) {
260
+ (0, errors_1.warn)(`Could not determine path for file ${f.name}. Skipping.`);
261
+ return null;
262
+ }
263
+ return {
264
+ destination: (0, node_path_1.join)(path.replace(dir, location), f.name.replace('.ejs', '')),
265
+ name: f.name,
266
+ src: (0, node_path_1.join)(path, f.name),
267
+ };
268
+ })
269
+ .filter((f) => f !== null);
@@ -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(','),
@@ -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 (0, node_path_1.join)(s3SubDir, 'versions', version, sha);
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 (0, node_path_1.join)(s3SubDir, 'channels', channel);
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) {
@@ -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 {
@@ -1195,5 +1195,5 @@
1195
1195
  ]
1196
1196
  }
1197
1197
  },
1198
- "version": "4.21.2"
1198
+ "version": "4.22.1"
1199
1199
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oclif",
3
3
  "description": "oclif: create your own CLI",
4
- "version": "4.21.2",
4
+ "version": "4.22.1",
5
5
  "author": "Salesforce",
6
6
  "bin": {
7
7
  "oclif": "bin/run.js"