oclif 4.3.4 → 4.3.6-dev.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.
@@ -27,6 +27,18 @@ const isYarnProject = (yarnRootPath) => {
27
27
  const rootYarnLockFilePath = path.join(yarnRootPath, yarnLockFileName);
28
28
  return (0, node_fs_1.existsSync)(rootYarnLockFilePath);
29
29
  };
30
+ const copyYarnDirectory = async (relativePath, yarnRootPath, workspacePath) => {
31
+ const rootYarnDirectoryPath = path.join(yarnRootPath, relativePath);
32
+ const workspaceYarnDirectoryPath = path.join(workspacePath, relativePath);
33
+ if ((0, node_fs_1.existsSync)(rootYarnDirectoryPath)) {
34
+ // create the directory if it does not exist
35
+ if (!(0, node_fs_1.existsSync)(workspaceYarnDirectoryPath)) {
36
+ await (0, promises_1.mkdir)(workspaceYarnDirectoryPath, { recursive: true });
37
+ }
38
+ // recursively copy all files in the directory
39
+ await (0, fs_extra_1.copy)(rootYarnDirectoryPath, workspaceYarnDirectoryPath);
40
+ }
41
+ };
30
42
  const copyCoreYarnFiles = async (yarnRootPath, workspacePath) => {
31
43
  // copy yarn dependencies lock file
32
44
  const yarnLockFileName = 'yarn.lock';
@@ -43,17 +55,9 @@ const copyCoreYarnFiles = async (yarnRootPath, workspacePath) => {
43
55
  await (0, fs_extra_1.copy)(rootYarnConfigFilePath, workspaceYarnConfigFilePath);
44
56
  }
45
57
  // copy yarn releases e.g. yarn may be installed via a local config path like "yarnPath"
46
- const yarnReleasesDirectoryRelativePath = './.yarn/releases/';
47
- const rootYarnReleasesDirectoryPath = path.join(yarnRootPath, yarnReleasesDirectoryRelativePath);
48
- const workspaceYarnReleasesDirectoryPath = path.join(workspacePath, yarnReleasesDirectoryRelativePath);
49
- if ((0, node_fs_1.existsSync)(rootYarnReleasesDirectoryPath)) {
50
- // create the directory if it does not exist
51
- if (!(0, node_fs_1.existsSync)(workspaceYarnReleasesDirectoryPath)) {
52
- await (0, promises_1.mkdir)(workspaceYarnReleasesDirectoryPath, { recursive: true });
53
- }
54
- // recursively copy all files in the directory
55
- await (0, fs_extra_1.copy)(rootYarnReleasesDirectoryPath, workspaceYarnReleasesDirectoryPath);
56
- }
58
+ await copyYarnDirectory('./.yarn/releases/', yarnRootPath, workspacePath);
59
+ // copy yarn plugins if they exists
60
+ await copyYarnDirectory('./.yarn/plugins/', yarnRootPath, workspacePath);
57
61
  };
58
62
  async function build(c, options = {}) {
59
63
  const { config, xz } = c;
@@ -53,7 +53,11 @@ const appendToIndex = async (input) => {
53
53
  Bucket: s3Config.bucket,
54
54
  Key: key,
55
55
  });
56
- existing = JSON.parse(Body?.toString());
56
+ // @ts-expect-error because StreamingBlobTypes doesn't have transformToString
57
+ // but it's expected to be there according to the docs
58
+ // https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-types/TypeAlias/StreamingBlobPayloadOutputTypes/
59
+ // https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-smithy-types/Interface/SdkStreamMixin/
60
+ existing = JSON.parse(await Body?.transformToString());
57
61
  debug('appending to existing index file');
58
62
  }
59
63
  catch (error) {
@@ -732,5 +732,5 @@
732
732
  ]
733
733
  }
734
734
  },
735
- "version": "4.3.4"
735
+ "version": "4.3.6-dev.0"
736
736
  }
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.3.4",
4
+ "version": "4.3.6-dev.0",
5
5
  "author": "Salesforce",
6
6
  "bin": {
7
7
  "oclif": "bin/run.js"