apify-cli 0.13.1-beta.0 → 0.13.1-beta.2

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.
@@ -61,7 +61,7 @@
61
61
  "sinon": "^9.2.4"
62
62
  },
63
63
  "engines": {
64
- "node": ">=12.0.0"
64
+ "node": ">=16.0.0"
65
65
  }
66
66
  },
67
67
  "node_modules/@apify/actor-templates": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apify-cli",
3
- "version": "0.13.1-beta.0",
3
+ "version": "0.13.1-beta.2",
4
4
  "description": "Apify command-line interface helps you create, develop, build and run Apify actors, and manage the Apify cloud platform.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "homepage": "https://github.com/apify/apify-cli#readme",
51
51
  "engines": {
52
- "node": ">=12.0.0"
52
+ "node": ">=16.0.0"
53
53
  },
54
54
  "dependencies": {
55
55
  "@apify/actor-templates": "^0.1.3",
@@ -18,6 +18,13 @@ const DEFAULT_RUN_OPTIONS = {
18
18
  memoryMbytes: 4096,
19
19
  timeoutSecs: 3600,
20
20
  };
21
+ const DEFAULT_ACTOR_VERSION_NUMBER = '0.0';
22
+
23
+ // It would be better to use `version-0.0` or similar,
24
+ // or even have no default tag, but the platform complains when
25
+ // actor does not have a build with a `latest` tag, so until
26
+ // that changes, we have to add it.
27
+ const DEFAULT_BUILD_TAG = 'latest';
21
28
 
22
29
  class PushCommand extends ApifyCommand {
23
30
  async run() {
@@ -29,8 +36,15 @@ class PushCommand extends ApifyCommand {
29
36
  let actorId;
30
37
  let actor;
31
38
  // User can override actor version and build tag, attributes in localConfig will remain same.
32
- const version = flags.version || flags.versionNumber || localConfig.version || '0.0';
33
- const buildTag = flags.buildTag || localConfig.buildTag;
39
+ const version = flags.version || flags.versionNumber || localConfig.version || DEFAULT_ACTOR_VERSION_NUMBER;
40
+ let buildTag = flags.buildTag || localConfig.buildTag;
41
+ // We can't add the default build tag to everything. If a user creates a new
42
+ // version, e.g. for testing, but forgets to add a tag, it would use the default
43
+ // tag and their production runs might be affected ❌
44
+ // TODO: revisit this when we have better build tagging system on platform.
45
+ if (!buildTag && version === DEFAULT_ACTOR_VERSION_NUMBER) {
46
+ buildTag = DEFAULT_BUILD_TAG;
47
+ }
34
48
  const waitForFinishMillis = Number.isNaN(flags.waitForFinish)
35
49
  ? undefined
36
50
  : parseInt(flags.waitForFinish, 10) * 1000;