heroku 9.2.0-beta.1 → 9.3.0-alpha.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.
@@ -60,7 +60,13 @@ class Push extends command_1.Command {
60
60
  else {
61
61
  core_1.ux.styledHeader(`Building ${job.name} (${job.dockerfile})`);
62
62
  }
63
- await DockerHelper.buildImage(job.dockerfile, job.resource, buildArgs, contextPath);
63
+ await DockerHelper.buildImage({
64
+ dockerfile: job.dockerfile,
65
+ resource: job.resource,
66
+ buildArgs,
67
+ path: contextPath,
68
+ arch: this.config.arch,
69
+ });
64
70
  }
65
71
  }
66
72
  catch (error) {
@@ -19,6 +19,14 @@ export declare type groupedDockerJobs = {
19
19
  export declare const getJobs: (resourceRoot: string, dockerfiles: string[]) => groupedDockerJobs;
20
20
  export declare const filterByProcessType: (jobs: groupedDockerJobs, processTypes: string[]) => groupedDockerJobs;
21
21
  export declare const chooseJobs: (jobs: groupedDockerJobs) => Promise<dockerJob[]>;
22
- export declare const buildImage: (dockerfile: string, resource: string, buildArgs: string[], path?: string) => Promise<string>;
22
+ declare type BuildImageParams = {
23
+ dockerfile: string;
24
+ resource: string;
25
+ buildArgs: string[];
26
+ path?: string;
27
+ arch?: string;
28
+ };
29
+ export declare const buildImage: ({ dockerfile, resource, buildArgs, path, arch }: BuildImageParams) => Promise<string>;
23
30
  export declare const pushImage: (resource: string) => Promise<string>;
24
31
  export declare const runImage: (resource: string, command: string, port: number) => Promise<string>;
32
+ export {};
@@ -7,6 +7,7 @@ const glob = require("glob");
7
7
  const Path = require("path");
8
8
  const inquirer = require("inquirer");
9
9
  const os = require("os");
10
+ const core_1 = require("@oclif/core");
10
11
  const DOCKERFILE_REGEX = /\bDockerfile(.\w*)?$/;
11
12
  const cmd = async function (cmd, args, options = {}) {
12
13
  (0, debug_1.debug)(cmd, args);
@@ -114,6 +115,10 @@ const chooseJobs = async function (jobs) {
114
115
  for (const processType in jobs) {
115
116
  if (Object.prototype.hasOwnProperty.call(jobs, processType)) {
116
117
  const group = jobs[processType];
118
+ if (group === undefined) {
119
+ core_1.ux.warn(`Dockerfile.${processType} not found`);
120
+ continue;
121
+ }
117
122
  if (group.length > 1) {
118
123
  const prompt = [{
119
124
  type: 'list',
@@ -135,9 +140,13 @@ const chooseJobs = async function (jobs) {
135
140
  return chosenJobs;
136
141
  };
137
142
  exports.chooseJobs = chooseJobs;
138
- const buildImage = async function (dockerfile, resource, buildArgs, path) {
143
+ const buildImage = async function ({ dockerfile, resource, buildArgs, path, arch }) {
139
144
  const cwd = path || Path.dirname(dockerfile);
140
- const args = ['build', '-f', dockerfile, '-t', resource, '--platform', 'linux/amd64'];
145
+ const args = ['build', '-f', dockerfile, '-t', resource];
146
+ // Older Docker versions don't allow for this flag, but we are
147
+ // adding it here when necessary to allow for pushing a docker build from m1/m2 Macs.
148
+ if (arch === 'arm64')
149
+ args.push('--platform', 'linux/amd64');
141
150
  for (const element of buildArgs) {
142
151
  if (element.length > 0) {
143
152
  args.push('--build-arg', element);
@@ -13779,5 +13779,5 @@
13779
13779
  ]
13780
13780
  }
13781
13781
  },
13782
- "version": "9.2.0-beta.1"
13782
+ "version": "9.3.0-alpha.1"
13783
13783
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "heroku",
3
3
  "description": "CLI to interact with Heroku",
4
- "version": "9.2.0-beta.1",
4
+ "version": "9.3.0-alpha.1",
5
5
  "author": "Heroku",
6
6
  "bin": "./bin/run",
7
7
  "bugs": "https://github.com/heroku/cli/issues",
@@ -94,7 +94,7 @@
94
94
  "@types/inquirer": "^8.2.10",
95
95
  "@types/lodash": "^4.14.123",
96
96
  "@types/mocha": "^10.0.6",
97
- "@types/node": "16.11.7",
97
+ "@types/node": "20.14.8",
98
98
  "@types/node-fetch": "^2.1.6",
99
99
  "@types/phoenix": "^1.4.0",
100
100
  "@types/proxyquire": "^1.3.28",
@@ -134,7 +134,7 @@
134
134
  "typescript": "4.8.4"
135
135
  },
136
136
  "engines": {
137
- "node": "~16.20.0"
137
+ "node": "~20.x"
138
138
  },
139
139
  "files": [
140
140
  "/autocomplete-scripts",
@@ -337,7 +337,7 @@
337
337
  },
338
338
  "update": {
339
339
  "node": {
340
- "version": "16.20.2"
340
+ "version": "20.17.0"
341
341
  },
342
342
  "s3": {
343
343
  "xz": true,
@@ -388,5 +388,5 @@
388
388
  "version": "oclif readme --multi && git add README.md ../../docs"
389
389
  },
390
390
  "types": "lib/index.d.ts",
391
- "gitHead": "5964369e5d44ae5bb17162655a2f57d97ba5ae04"
391
+ "gitHead": "d397b63c3e1c0e3bad490f7a0ae82c40caffdfb7"
392
392
  }