apify-cli 1.0.0 → 1.1.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.
Files changed (225) hide show
  1. package/CHANGELOG.md +236 -84
  2. package/LICENSE.md +201 -0
  3. package/README.md +49 -543
  4. package/dist/.tsbuildinfo +1 -1
  5. package/dist/actor.js +3 -0
  6. package/dist/actor.js.map +1 -0
  7. package/dist/apify.js +3 -0
  8. package/dist/apify.js.map +1 -0
  9. package/dist/chunk-TJMCNXPV.js +242 -0
  10. package/dist/chunk-TJMCNXPV.js.map +1 -0
  11. package/dist/index.js +2 -3
  12. package/package.json +113 -89
  13. package/bin/dev.cmd +0 -3
  14. package/bin/dev.js +0 -21
  15. package/bin/dev.sh +0 -4
  16. package/bin/run.cmd +0 -3
  17. package/bin/run.js +0 -23
  18. package/dist/commands/actor/get-input.d.ts +0 -6
  19. package/dist/commands/actor/get-input.d.ts.map +0 -1
  20. package/dist/commands/actor/get-input.js +0 -14
  21. package/dist/commands/actor/get-input.js.map +0 -1
  22. package/dist/commands/actor/get-value.d.ts +0 -9
  23. package/dist/commands/actor/get-value.d.ts.map +0 -1
  24. package/dist/commands/actor/get-value.js +0 -27
  25. package/dist/commands/actor/get-value.js.map +0 -1
  26. package/dist/commands/actor/index.d.ts +0 -6
  27. package/dist/commands/actor/index.d.ts.map +0 -1
  28. package/dist/commands/actor/index.js +0 -13
  29. package/dist/commands/actor/index.js.map +0 -1
  30. package/dist/commands/actor/push-data.d.ts +0 -11
  31. package/dist/commands/actor/push-data.d.ts.map +0 -1
  32. package/dist/commands/actor/push-data.js +0 -56
  33. package/dist/commands/actor/push-data.js.map +0 -1
  34. package/dist/commands/actor/set-value.d.ts +0 -15
  35. package/dist/commands/actor/set-value.d.ts.map +0 -1
  36. package/dist/commands/actor/set-value.js +0 -76
  37. package/dist/commands/actor/set-value.js.map +0 -1
  38. package/dist/commands/call.d.ts +0 -19
  39. package/dist/commands/call.d.ts.map +0 -1
  40. package/dist/commands/call.js +0 -193
  41. package/dist/commands/call.js.map +0 -1
  42. package/dist/commands/check-version.d.ts +0 -11
  43. package/dist/commands/check-version.d.ts.map +0 -1
  44. package/dist/commands/check-version.js +0 -39
  45. package/dist/commands/check-version.js.map +0 -1
  46. package/dist/commands/create.d.ts +0 -15
  47. package/dist/commands/create.d.ts.map +0 -1
  48. package/dist/commands/create.js +0 -201
  49. package/dist/commands/create.js.map +0 -1
  50. package/dist/commands/edit-input-schema.d.ts +0 -11
  51. package/dist/commands/edit-input-schema.d.ts.map +0 -1
  52. package/dist/commands/edit-input-schema.js +0 -176
  53. package/dist/commands/edit-input-schema.js.map +0 -1
  54. package/dist/commands/info.d.ts +0 -6
  55. package/dist/commands/info.d.ts.map +0 -1
  56. package/dist/commands/info.js +0 -26
  57. package/dist/commands/info.js.map +0 -1
  58. package/dist/commands/init-wrap-scrapy.d.ts +0 -10
  59. package/dist/commands/init-wrap-scrapy.d.ts.map +0 -1
  60. package/dist/commands/init-wrap-scrapy.js +0 -41
  61. package/dist/commands/init-wrap-scrapy.js.map +0 -1
  62. package/dist/commands/init.d.ts +0 -12
  63. package/dist/commands/init.d.ts.map +0 -1
  64. package/dist/commands/init.js +0 -88
  65. package/dist/commands/init.js.map +0 -1
  66. package/dist/commands/login.d.ts +0 -10
  67. package/dist/commands/login.d.ts.map +0 -1
  68. package/dist/commands/login.js +0 -174
  69. package/dist/commands/login.js.map +0 -1
  70. package/dist/commands/logout.d.ts +0 -6
  71. package/dist/commands/logout.d.ts.map +0 -1
  72. package/dist/commands/logout.js +0 -20
  73. package/dist/commands/logout.js.map +0 -1
  74. package/dist/commands/pull.d.ts +0 -12
  75. package/dist/commands/pull.d.ts.map +0 -1
  76. package/dist/commands/pull.js +0 -148
  77. package/dist/commands/pull.js.map +0 -1
  78. package/dist/commands/push.d.ts +0 -18
  79. package/dist/commands/push.d.ts.map +0 -1
  80. package/dist/commands/push.js +0 -298
  81. package/dist/commands/push.js.map +0 -1
  82. package/dist/commands/run.d.ts +0 -16
  83. package/dist/commands/run.d.ts.map +0 -1
  84. package/dist/commands/run.js +0 -383
  85. package/dist/commands/run.js.map +0 -1
  86. package/dist/commands/secrets/add.d.ts +0 -10
  87. package/dist/commands/secrets/add.d.ts.map +0 -1
  88. package/dist/commands/secrets/add.js +0 -31
  89. package/dist/commands/secrets/add.js.map +0 -1
  90. package/dist/commands/secrets/index.d.ts +0 -6
  91. package/dist/commands/secrets/index.d.ts.map +0 -1
  92. package/dist/commands/secrets/index.js +0 -24
  93. package/dist/commands/secrets/index.js.map +0 -1
  94. package/dist/commands/secrets/rm.d.ts +0 -9
  95. package/dist/commands/secrets/rm.d.ts.map +0 -1
  96. package/dist/commands/secrets/rm.js +0 -27
  97. package/dist/commands/secrets/rm.js.map +0 -1
  98. package/dist/commands/task/index.d.ts +0 -6
  99. package/dist/commands/task/index.d.ts.map +0 -1
  100. package/dist/commands/task/index.js +0 -13
  101. package/dist/commands/task/index.js.map +0 -1
  102. package/dist/commands/task/run.d.ts +0 -16
  103. package/dist/commands/task/run.d.ts.map +0 -1
  104. package/dist/commands/task/run.js +0 -91
  105. package/dist/commands/task/run.js.map +0 -1
  106. package/dist/commands/validate-schema.d.ts +0 -10
  107. package/dist/commands/validate-schema.d.ts.map +0 -1
  108. package/dist/commands/validate-schema.js +0 -58
  109. package/dist/commands/validate-schema.js.map +0 -1
  110. package/dist/hooks/deprecations.d.ts +0 -4
  111. package/dist/hooks/deprecations.d.ts.map +0 -1
  112. package/dist/hooks/deprecations.js +0 -18
  113. package/dist/hooks/deprecations.js.map +0 -1
  114. package/dist/hooks/init.d.ts +0 -7
  115. package/dist/hooks/init.d.ts.map +0 -1
  116. package/dist/hooks/init.js +0 -17
  117. package/dist/hooks/init.js.map +0 -1
  118. package/dist/index.d.ts +0 -2
  119. package/dist/index.d.ts.map +0 -1
  120. package/dist/index.js.map +0 -1
  121. package/dist/lib/actor.d.ts +0 -27
  122. package/dist/lib/actor.d.ts.map +0 -1
  123. package/dist/lib/actor.js +0 -67
  124. package/dist/lib/actor.js.map +0 -1
  125. package/dist/lib/apify-oclif-help.d.ts +0 -15
  126. package/dist/lib/apify-oclif-help.d.ts.map +0 -1
  127. package/dist/lib/apify-oclif-help.js +0 -19
  128. package/dist/lib/apify-oclif-help.js.map +0 -1
  129. package/dist/lib/apify_command.d.ts +0 -21
  130. package/dist/lib/apify_command.d.ts.map +0 -1
  131. package/dist/lib/apify_command.js +0 -104
  132. package/dist/lib/apify_command.js.map +0 -1
  133. package/dist/lib/commands/resolve-input.d.ts +0 -5
  134. package/dist/lib/commands/resolve-input.d.ts.map +0 -1
  135. package/dist/lib/commands/resolve-input.js +0 -29
  136. package/dist/lib/commands/resolve-input.js.map +0 -1
  137. package/dist/lib/commands/run-on-cloud.d.ts +0 -20
  138. package/dist/lib/commands/run-on-cloud.d.ts.map +0 -1
  139. package/dist/lib/commands/run-on-cloud.js +0 -89
  140. package/dist/lib/commands/run-on-cloud.js.map +0 -1
  141. package/dist/lib/community.d.ts +0 -2
  142. package/dist/lib/community.d.ts.map +0 -1
  143. package/dist/lib/community.js +0 -4
  144. package/dist/lib/community.js.map +0 -1
  145. package/dist/lib/consts.d.ts +0 -54
  146. package/dist/lib/consts.d.ts.map +0 -1
  147. package/dist/lib/consts.js +0 -65
  148. package/dist/lib/consts.js.map +0 -1
  149. package/dist/lib/create-utils.d.ts +0 -8
  150. package/dist/lib/create-utils.d.ts.map +0 -1
  151. package/dist/lib/create-utils.js +0 -148
  152. package/dist/lib/create-utils.js.map +0 -1
  153. package/dist/lib/exec.d.ts +0 -3
  154. package/dist/lib/exec.d.ts.map +0 -1
  155. package/dist/lib/exec.js +0 -40
  156. package/dist/lib/exec.js.map +0 -1
  157. package/dist/lib/files.d.ts +0 -14
  158. package/dist/lib/files.d.ts.map +0 -1
  159. package/dist/lib/files.js +0 -58
  160. package/dist/lib/files.js.map +0 -1
  161. package/dist/lib/input_schema.d.ts +0 -28
  162. package/dist/lib/input_schema.d.ts.map +0 -1
  163. package/dist/lib/input_schema.js +0 -126
  164. package/dist/lib/input_schema.js.map +0 -1
  165. package/dist/lib/local_state.d.ts +0 -11
  166. package/dist/lib/local_state.d.ts.map +0 -1
  167. package/dist/lib/local_state.js +0 -27
  168. package/dist/lib/local_state.js.map +0 -1
  169. package/dist/lib/outputs.d.ts +0 -19
  170. package/dist/lib/outputs.d.ts.map +0 -1
  171. package/dist/lib/outputs.js +0 -45
  172. package/dist/lib/outputs.js.map +0 -1
  173. package/dist/lib/project_analyzer.d.ts +0 -4
  174. package/dist/lib/project_analyzer.d.ts.map +0 -1
  175. package/dist/lib/project_analyzer.js +0 -30
  176. package/dist/lib/project_analyzer.js.map +0 -1
  177. package/dist/lib/projects/CrawleeAnalyzer.d.ts +0 -4
  178. package/dist/lib/projects/CrawleeAnalyzer.d.ts.map +0 -1
  179. package/dist/lib/projects/CrawleeAnalyzer.js +0 -20
  180. package/dist/lib/projects/CrawleeAnalyzer.js.map +0 -1
  181. package/dist/lib/projects/OldApifySDKAnalyzer.d.ts +0 -4
  182. package/dist/lib/projects/OldApifySDKAnalyzer.d.ts.map +0 -1
  183. package/dist/lib/projects/OldApifySDKAnalyzer.js +0 -38
  184. package/dist/lib/projects/OldApifySDKAnalyzer.js.map +0 -1
  185. package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.d.ts +0 -17
  186. package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.d.ts.map +0 -1
  187. package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.js +0 -87
  188. package/dist/lib/projects/scrapy/ScrapyProjectAnalyzer.js.map +0 -1
  189. package/dist/lib/projects/scrapy/Spider.d.ts +0 -14
  190. package/dist/lib/projects/scrapy/Spider.d.ts.map +0 -1
  191. package/dist/lib/projects/scrapy/Spider.js +0 -33
  192. package/dist/lib/projects/scrapy/Spider.js.map +0 -1
  193. package/dist/lib/projects/scrapy/SpiderFileAnalyzer.d.ts +0 -7
  194. package/dist/lib/projects/scrapy/SpiderFileAnalyzer.d.ts.map +0 -1
  195. package/dist/lib/projects/scrapy/SpiderFileAnalyzer.js +0 -25
  196. package/dist/lib/projects/scrapy/SpiderFileAnalyzer.js.map +0 -1
  197. package/dist/lib/projects/scrapy/wrapScrapyProject.d.ts +0 -4
  198. package/dist/lib/projects/scrapy/wrapScrapyProject.d.ts.map +0 -1
  199. package/dist/lib/projects/scrapy/wrapScrapyProject.js +0 -109
  200. package/dist/lib/projects/scrapy/wrapScrapyProject.js.map +0 -1
  201. package/dist/lib/projects/shared.d.ts +0 -2
  202. package/dist/lib/projects/shared.d.ts.map +0 -1
  203. package/dist/lib/projects/shared.js +0 -13
  204. package/dist/lib/projects/shared.js.map +0 -1
  205. package/dist/lib/secrets.d.ts +0 -22
  206. package/dist/lib/secrets.d.ts.map +0 -1
  207. package/dist/lib/secrets.js +0 -104
  208. package/dist/lib/secrets.js.map +0 -1
  209. package/dist/lib/telemetry.d.ts +0 -21
  210. package/dist/lib/telemetry.d.ts.map +0 -1
  211. package/dist/lib/telemetry.js +0 -87
  212. package/dist/lib/telemetry.js.map +0 -1
  213. package/dist/lib/types.d.ts +0 -11
  214. package/dist/lib/types.d.ts.map +0 -1
  215. package/dist/lib/types.js +0 -2
  216. package/dist/lib/types.js.map +0 -1
  217. package/dist/lib/utils.d.ts +0 -102
  218. package/dist/lib/utils.d.ts.map +0 -1
  219. package/dist/lib/utils.js +0 -577
  220. package/dist/lib/utils.js.map +0 -1
  221. package/dist/lib/version_check.d.ts +0 -14
  222. package/dist/lib/version_check.d.ts.map +0 -1
  223. package/dist/lib/version_check.js +0 -90
  224. package/dist/lib/version_check.js.map +0 -1
  225. package/oclif.manifest.json +0 -867
@@ -1,89 +0,0 @@
1
- import process from 'node:process';
2
- import { ACTOR_JOB_STATUSES } from '@apify/consts';
3
- import { Flags } from '@oclif/core';
4
- import { resolveInput } from './resolve-input.js';
5
- import { CommandExitCodes } from '../consts.js';
6
- import { error, link, run as runLog, success, warning } from '../outputs.js';
7
- import { outputJobLog } from '../utils.js';
8
- export async function runActorOrTaskOnCloud(apifyClient, options) {
9
- const cwd = process.cwd();
10
- const { actorOrTaskData, runOptions, type, waitForFinishMillis, inputOverride, } = options;
11
- const clientMethod = type === 'Actor' ? 'actor' : 'task';
12
- // Get input for actor
13
- const actorInput = resolveInput(cwd, inputOverride);
14
- if (type === 'Actor') {
15
- runLog({ message: `Calling ${type} ${actorOrTaskData.userFriendlyId} (${actorOrTaskData.id})` });
16
- }
17
- else if (actorOrTaskData.title) {
18
- runLog({ message: `Calling ${type} ${actorOrTaskData.title} (${actorOrTaskData.userFriendlyId}, ${actorOrTaskData.id})` });
19
- }
20
- else {
21
- runLog({ message: `Calling ${type} ${actorOrTaskData.userFriendlyId} (${actorOrTaskData.id})` });
22
- }
23
- let run;
24
- try {
25
- if (actorInput && type === 'Actor') {
26
- // TODO: For some reason we cannot pass json as buffer with right contentType into apify-client.
27
- // It will save malformed JSON which looks like buffer as INPUT.
28
- // We need to fix this in v1 during removing call under Actor namespace.
29
- run = await apifyClient[clientMethod](actorOrTaskData.id).start(actorInput.inputToUse, { ...runOptions, contentType: actorInput.contentType });
30
- }
31
- else {
32
- run = await apifyClient[clientMethod](actorOrTaskData.id).start(undefined, runOptions);
33
- }
34
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
35
- }
36
- catch (err) {
37
- // TODO: Better error message in apify-client-js
38
- if (err.type === 'record-not-found')
39
- throw new Error(`${type} ${actorOrTaskData.userFriendlyId} (${actorOrTaskData.id}) not found!`);
40
- else
41
- throw err;
42
- }
43
- try {
44
- await outputJobLog(run, waitForFinishMillis);
45
- }
46
- catch (err) {
47
- warning({ message: 'Can not get log:' });
48
- console.error(err);
49
- }
50
- run = (await apifyClient.run(run.id).get());
51
- link({ message: `${type} run detail`, url: `https://console.apify.com/actors/${run.actId}#/runs/${run.id}` });
52
- if (run.status === ACTOR_JOB_STATUSES.SUCCEEDED) {
53
- success({ message: `${type} finished.` });
54
- }
55
- else if (run.status === ACTOR_JOB_STATUSES.RUNNING) {
56
- warning({ message: `${type} is still running!` });
57
- }
58
- else if (run.status === ACTOR_JOB_STATUSES.ABORTED || run.status === ACTOR_JOB_STATUSES.ABORTING) {
59
- warning({ message: `${type} was aborted!` });
60
- process.exitCode = CommandExitCodes.RunAborted;
61
- }
62
- else {
63
- error({ message: `${type} failed!` });
64
- process.exitCode = CommandExitCodes.RunFailed;
65
- }
66
- }
67
- export const SharedRunOnCloudFlags = (type) => ({
68
- build: Flags.string({
69
- char: 'b',
70
- description: 'Tag or number of the build to run (e.g. "latest" or "1.2.34").',
71
- required: false,
72
- }),
73
- timeout: Flags.integer({
74
- char: 't',
75
- description: `Timeout for the ${type} run in seconds. Zero value means there is no timeout.`,
76
- required: false,
77
- }),
78
- memory: Flags.integer({
79
- char: 'm',
80
- description: `Amount of memory allocated for the ${type} run, in megabytes.`,
81
- required: false,
82
- }),
83
- 'wait-for-finish': Flags.string({
84
- char: 'w',
85
- description: 'Seconds for waiting to run to finish, if no value passed, it waits forever.',
86
- required: false,
87
- }),
88
- });
89
- //# sourceMappingURL=run-on-cloud.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"run-on-cloud.js","sourceRoot":"","sources":["../../../src/lib/commands/run-on-cloud.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGpC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAc3C,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,WAAwB,EAAE,OAA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OAAO,IAAI,GAAG,CAAC,MAAM,KAAK,kBAAkB,CAAC,QAAQ,EAAE,CAAC;QACjG,OAAO,CAAC,EAAE,OAAO,EAAE,GAAG,IAAI,eAAe,EAAE,CAAC,CAAC;QAC7C,OAAO,CAAC,QAAQ,GAAG,gBAAgB,CAAC,UAAU,CAAC;IACnD,CAAC;SAAM,CAAC;QACJ,KAAK,CAAC,EAAE,OAAO,EAAE,GAAG,IAAI,UAAU,EAAE,CAAC,CAAC;QACtC,OAAO,CAAC,QAAQ,GAAG,gBAAgB,CAAC,SAAS,CAAC;IAClD,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,IAAsB,EAAE,EAAE,CAAC,CAAC;IAC9D,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC;QAChB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,gEAAgE;QAC7E,QAAQ,EAAE,KAAK;KAClB,CAAC;IACF,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC;QACnB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,mBAAmB,IAAI,wDAAwD;QAC5F,QAAQ,EAAE,KAAK;KAClB,CAAC;IACF,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC;QAClB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,sCAAsC,IAAI,qBAAqB;QAC5E,QAAQ,EAAE,KAAK;KAClB,CAAC;IACF,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC;QAC5B,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,6EAA6E;QAC1F,QAAQ,EAAE,KAAK;KAClB,CAAC;CACL,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=community.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"community.d.ts","sourceRoot":"","sources":["../../src/lib/community.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- console.log('We have an active developer community on Discord. '
2
- + 'You can find it on https://discord.gg/crawlee-apify-801163717915574323.');
3
- export {};
4
- //# sourceMappingURL=community.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"community.js","sourceRoot":"","sources":["../../src/lib/community.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,GAAG,CAAC,oDAAoD;MAClD,yEAAyE,CACtF,CAAC"}
@@ -1,54 +0,0 @@
1
- export declare const DEFAULT_LOCAL_STORAGE_DIR = "storage";
2
- export declare const LEGACY_LOCAL_STORAGE_DIR = "apify_storage";
3
- export declare const ACTOR_SPECIFICATION_VERSION = 1;
4
- export declare const EMPTY_LOCAL_CONFIG: {
5
- actorSpecification: number;
6
- name: null;
7
- version: string;
8
- buildTag: string;
9
- environmentVariables: {};
10
- };
11
- export declare const LANGUAGE: {
12
- NODEJS: string;
13
- PYTHON: string;
14
- UNKNOWN: string;
15
- };
16
- export type Language = typeof LANGUAGE[keyof typeof LANGUAGE];
17
- export declare const PROJECT_TYPES: {
18
- SCRAPY: string;
19
- CRAWLEE: string;
20
- PRE_CRAWLEE_APIFY_SDK: string;
21
- UNKNOWN: string;
22
- };
23
- export declare const COMMANDS_WITHIN_ACTOR: string[];
24
- export declare const CHECK_VERSION_EVERY_MILLIS: number;
25
- export declare const GLOBAL_CONFIGS_FOLDER: () => string;
26
- export declare const AUTH_FILE_PATH: () => string;
27
- export declare const SECRETS_FILE_PATH: () => string;
28
- export declare const STATE_FILE_PATH: () => string;
29
- export declare const TELEMETRY_FILE_PATH: () => string;
30
- export declare const DEPRECATED_LOCAL_CONFIG_NAME = "apify.json";
31
- export declare const ACTOR_SPECIFICATION_FOLDER = ".actor";
32
- export declare const LOCAL_CONFIG_NAME = "actor.json";
33
- export declare const LOCAL_CONFIG_PATH: string;
34
- export declare const INPUT_FILE_REG_EXP: RegExp;
35
- export declare const MAIN_FILE = "main.js";
36
- export declare const UPLOADS_STORE_NAME = "apify-cli-deployments";
37
- export declare const SUPPORTED_NODEJS_VERSION: any;
38
- export declare const CURRENT_APIFY_CLI_VERSION: any;
39
- export declare const APIFY_CLIENT_DEFAULT_HEADERS: {
40
- 'X-Apify-Request-Origin': "CLI";
41
- };
42
- export declare const MINIMUM_SUPPORTED_PYTHON_VERSION = "3.8.0";
43
- export declare const PYTHON_VENV_PATH = ".venv";
44
- export declare const MIXPANEL_TOKEN = "ea75e434d4b4d2405d79ed9d14bfc93b";
45
- export declare enum CommandExitCodes {
46
- BuildFailed = 1,
47
- RunFailed = 1,
48
- BuildTimedOut = 2,
49
- BuildAborted = 3,
50
- RunAborted = 3,
51
- NoFilesToPush = 4,
52
- InvalidInput = 5
53
- }
54
- //# sourceMappingURL=consts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/lib/consts.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,yBAAyB,YAAY,CAAC;AAEnD,eAAO,MAAM,wBAAwB,kBAAkB,CAAC;AAExD,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C,eAAO,MAAM,kBAAkB;;;;;;CAM9B,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC;AAE9D,eAAO,MAAM,aAAa;;;;;CAKzB,CAAC;AAEF,eAAO,MAAM,qBAAqB,UAA0C,CAAC;AAE7E,eAAO,MAAM,0BAA0B,QAAsB,CAAC;AAE9D,eAAO,MAAM,qBAAqB,cAQjC,CAAC;AAEF,eAAO,MAAM,cAAc,cAAmD,CAAC;AAE/E,eAAO,MAAM,iBAAiB,cAAsD,CAAC;AAErF,eAAO,MAAM,eAAe,cAAoD,CAAC;AAEjF,eAAO,MAAM,mBAAmB,cAAwD,CAAC;AAEzF,eAAO,MAAM,4BAA4B,eAAe,CAAC;AAEzD,eAAO,MAAM,0BAA0B,WAAW,CAAC;AAEnD,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAE9C,eAAO,MAAM,iBAAiB,QAAsD,CAAC;AAErF,eAAO,MAAM,kBAAkB,QAAoD,CAAC;AAEpF,eAAO,MAAM,SAAS,YAAY,CAAC;AAEnC,eAAO,MAAM,kBAAkB,0BAA0B,CAAC;AAI1D,eAAO,MAAM,wBAAwB,KAAmB,CAAC;AAEzD,eAAO,MAAM,yBAAyB,KAAc,CAAC;AAErD,eAAO,MAAM,4BAA4B;;CAAiD,CAAC;AAE3F,eAAO,MAAM,gCAAgC,UAAU,CAAC;AAExD,eAAO,MAAM,gBAAgB,UAAU,CAAC;AAExC,eAAO,MAAM,cAAc,qCAAqC,CAAC;AAEjE,oBAAY,gBAAgB;IACxB,WAAW,IAAI;IACf,SAAS,IAAI;IAEb,aAAa,IAAI;IAEjB,YAAY,IAAI;IAChB,UAAU,IAAI;IAEd,aAAa,IAAI;IAEjB,YAAY,IAAI;CACnB"}
@@ -1,65 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-duplicate-enum-values */
2
- /* eslint-disable no-underscore-dangle */
3
- import { readFileSync } from 'node:fs';
4
- import { homedir } from 'node:os';
5
- import { join } from 'node:path';
6
- import { KEY_VALUE_STORE_KEYS, META_ORIGINS } from '@apify/consts';
7
- export const DEFAULT_LOCAL_STORAGE_DIR = 'storage';
8
- export const LEGACY_LOCAL_STORAGE_DIR = 'apify_storage';
9
- export const ACTOR_SPECIFICATION_VERSION = 1;
10
- export const EMPTY_LOCAL_CONFIG = {
11
- actorSpecification: ACTOR_SPECIFICATION_VERSION,
12
- name: null,
13
- version: '0.0',
14
- buildTag: 'latest',
15
- environmentVariables: {},
16
- };
17
- export const LANGUAGE = {
18
- NODEJS: 'nodejs',
19
- PYTHON: 'python',
20
- UNKNOWN: 'n/a',
21
- };
22
- export const PROJECT_TYPES = {
23
- SCRAPY: 'scrapy',
24
- CRAWLEE: 'crawlee',
25
- PRE_CRAWLEE_APIFY_SDK: 'apify',
26
- UNKNOWN: 'unknown',
27
- };
28
- export const COMMANDS_WITHIN_ACTOR = ['init', 'run', 'push', 'pull', 'call'];
29
- export const CHECK_VERSION_EVERY_MILLIS = 24 * 60 * 60 * 1000; // Once a day
30
- export const GLOBAL_CONFIGS_FOLDER = () => {
31
- const base = join(homedir(), '.apify');
32
- if (process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__) {
33
- return join(base, process.env.__APIFY_INTERNAL_TEST_AUTH_PATH__);
34
- }
35
- return base;
36
- };
37
- export const AUTH_FILE_PATH = () => join(GLOBAL_CONFIGS_FOLDER(), 'auth.json');
38
- export const SECRETS_FILE_PATH = () => join(GLOBAL_CONFIGS_FOLDER(), 'secrets.json');
39
- export const STATE_FILE_PATH = () => join(GLOBAL_CONFIGS_FOLDER(), 'state.json');
40
- export const TELEMETRY_FILE_PATH = () => join(GLOBAL_CONFIGS_FOLDER(), 'telemetry.json');
41
- export const DEPRECATED_LOCAL_CONFIG_NAME = 'apify.json';
42
- export const ACTOR_SPECIFICATION_FOLDER = '.actor';
43
- export const LOCAL_CONFIG_NAME = 'actor.json';
44
- export const LOCAL_CONFIG_PATH = join(ACTOR_SPECIFICATION_FOLDER, LOCAL_CONFIG_NAME);
45
- export const INPUT_FILE_REG_EXP = new RegExp(`^${KEY_VALUE_STORE_KEYS.INPUT}\\..*`);
46
- export const MAIN_FILE = 'main.js';
47
- export const UPLOADS_STORE_NAME = 'apify-cli-deployments';
48
- const pkg = JSON.parse(readFileSync(new URL('../../package.json', import.meta.url), 'utf8'));
49
- export const SUPPORTED_NODEJS_VERSION = pkg.engines.node;
50
- export const CURRENT_APIFY_CLI_VERSION = pkg.version;
51
- export const APIFY_CLIENT_DEFAULT_HEADERS = { 'X-Apify-Request-Origin': META_ORIGINS.CLI };
52
- export const MINIMUM_SUPPORTED_PYTHON_VERSION = '3.8.0';
53
- export const PYTHON_VENV_PATH = '.venv';
54
- export const MIXPANEL_TOKEN = 'ea75e434d4b4d2405d79ed9d14bfc93b';
55
- export var CommandExitCodes;
56
- (function (CommandExitCodes) {
57
- CommandExitCodes[CommandExitCodes["BuildFailed"] = 1] = "BuildFailed";
58
- CommandExitCodes[CommandExitCodes["RunFailed"] = 1] = "RunFailed";
59
- CommandExitCodes[CommandExitCodes["BuildTimedOut"] = 2] = "BuildTimedOut";
60
- CommandExitCodes[CommandExitCodes["BuildAborted"] = 3] = "BuildAborted";
61
- CommandExitCodes[CommandExitCodes["RunAborted"] = 3] = "RunAborted";
62
- CommandExitCodes[CommandExitCodes["NoFilesToPush"] = 4] = "NoFilesToPush";
63
- CommandExitCodes[CommandExitCodes["InvalidInput"] = 5] = "InvalidInput";
64
- })(CommandExitCodes || (CommandExitCodes = {}));
65
- //# sourceMappingURL=consts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/lib/consts.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yCAAyC;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAEnE,MAAM,CAAC,MAAM,yBAAyB,GAAG,SAAS,CAAC;AAEnD,MAAM,CAAC,MAAM,wBAAwB,GAAG,eAAe,CAAC;AAExD,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC;AAE7C,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAC9B,kBAAkB,EAAE,2BAA2B;IAC/C,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,QAAQ;IAClB,oBAAoB,EAAE,EAAE;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACpB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,KAAK;CACjB,CAAC;AAIF,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,MAAM,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MAAM,iBAAiB,GAAG,IAAI,CAAC,0BAA0B,EAAE,iBAAiB,CAAC,CAAC;AAErF,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,MAAM,CAAC,IAAI,oBAAoB,CAAC,KAAK,OAAO,CAAC,CAAC;AAEpF,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC;AAEnC,MAAM,CAAC,MAAM,kBAAkB,GAAG,uBAAuB,CAAC;AAE1D,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,GAAG,CAAC,oBAAoB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAE7F,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;AAEzD,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAC,OAAO,CAAC;AAErD,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAE,wBAAwB,EAAE,YAAY,CAAC,GAAG,EAAE,CAAC;AAE3F,MAAM,CAAC,MAAM,gCAAgC,GAAG,OAAO,CAAC;AAExD,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,CAAC;AAExC,MAAM,CAAC,MAAM,cAAc,GAAG,kCAAkC,CAAC;AAEjE,MAAM,CAAN,IAAY,gBAYX;AAZD,WAAY,gBAAgB;IACxB,qEAAe,CAAA;IACf,iEAAa,CAAA;IAEb,yEAAiB,CAAA;IAEjB,uEAAgB,CAAA;IAChB,mEAAc,CAAA;IAEd,yEAAiB,CAAA;IAEjB,uEAAgB,CAAA;AACpB,CAAC,EAZW,gBAAgB,KAAhB,gBAAgB,QAY3B"}
@@ -1,8 +0,0 @@
1
- import { Manifest, Template } from '@apify/actor-templates';
2
- export declare const ensureValidActorName: (maybeActorName?: string) => Promise<string>;
3
- export declare const getTemplateDefinition: (maybeTemplateName: string | undefined, manifestPromise: Promise<Manifest | Error>) => Promise<Template>;
4
- /**
5
- * Fetch local readme suffix from the manifest and append it to the readme.
6
- */
7
- export declare const enhanceReadmeWithLocalSuffix: (readmePath: string, manifestPromise: Promise<Manifest | Error>) => Promise<void>;
8
- //# sourceMappingURL=create-utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-utils.d.ts","sourceRoot":"","sources":["../../src/lib/create-utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAS5D,eAAO,MAAM,oBAAoB,oBAA2B,MAAM,oBAMjE,CAAC;AAGF,eAAO,MAAM,qBAAqB,sBAA6B,MAAM,GAAG,SAAS,mBAAmB,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC,sBAe5H,CAAC;AAGF;;GAEG;AACH,eAAO,MAAM,4BAA4B,eAAsB,MAAM,mBAAmB,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC,kBAchH,CAAC"}
@@ -1,148 +0,0 @@
1
- import { createWriteStream } from 'node:fs';
2
- import { pipeline } from 'node:stream/promises';
3
- import chalk from 'chalk';
4
- import inquirer from 'inquirer';
5
- import { warning } from './outputs.js';
6
- import { httpsGet, validateActorName } from './utils.js';
7
- const PROGRAMMING_LANGUAGES = ['JavaScript', 'TypeScript', 'Python'];
8
- export const ensureValidActorName = async (maybeActorName) => {
9
- if (maybeActorName) {
10
- validateActorName(maybeActorName);
11
- return maybeActorName;
12
- }
13
- return promptActorName();
14
- };
15
- // TODO: this isn't even used anymore
16
- export const getTemplateDefinition = async (maybeTemplateName, manifestPromise) => {
17
- const manifest = await manifestPromise;
18
- // If the fetch failed earlier, the resolve value of
19
- // the promise will be the error from fetching the manifest.
20
- if (manifest instanceof Error)
21
- throw manifest;
22
- if (maybeTemplateName) {
23
- const templateDefinition = manifest.templates.find((t) => t.name === maybeTemplateName);
24
- if (!templateDefinition) {
25
- throw new Error(`Could not find the selected template: ${maybeTemplateName} in the list of templates.`);
26
- }
27
- return templateDefinition;
28
- }
29
- return executePrompts(manifest);
30
- };
31
- // TODO: this isn't even used anymore
32
- /**
33
- * Fetch local readme suffix from the manifest and append it to the readme.
34
- */
35
- export const enhanceReadmeWithLocalSuffix = async (readmePath, manifestPromise) => {
36
- const manifest = await manifestPromise;
37
- // If the fetch failed earlier, the resolve value of
38
- // the promise will be the error from fetching the manifest.
39
- if (manifest instanceof Error)
40
- throw manifest;
41
- try {
42
- const suffixStream = await httpsGet(manifest.localReadmeSuffixUrl);
43
- const readmeStream = createWriteStream(readmePath, { flags: 'a' });
44
- readmeStream.write('\n\n');
45
- await pipeline(suffixStream, readmeStream);
46
- }
47
- catch (err) {
48
- warning({ message: `Could not append local development instructions to README.md. Cause: ${err.message}` });
49
- }
50
- };
51
- /**
52
- * Inquirer does not have a native way to "go back" between prompts.
53
- */
54
- async function executePrompts(manifest) {
55
- const programmingLanguage = await promptProgrammingLanguage();
56
- // eslint-disable-next-line no-constant-condition
57
- while (true) {
58
- const templateDefinition = await promptTemplateDefinition(manifest, programmingLanguage);
59
- if (templateDefinition) {
60
- const shouldInstall = await promptTemplateInstallation(templateDefinition);
61
- if (shouldInstall) {
62
- return templateDefinition;
63
- }
64
- }
65
- else {
66
- return executePrompts(manifest);
67
- }
68
- }
69
- }
70
- async function promptActorName() {
71
- const answer = await inquirer.prompt([{
72
- name: 'actorName',
73
- message: 'Name of your new Actor:',
74
- type: 'input',
75
- validate: (promptText) => {
76
- try {
77
- validateActorName(promptText);
78
- }
79
- catch (err) {
80
- return err.message;
81
- }
82
- return true;
83
- },
84
- }]);
85
- return answer.actorName;
86
- }
87
- async function promptProgrammingLanguage() {
88
- const answer = await inquirer.prompt([{
89
- type: 'list',
90
- name: 'programmingLanguage',
91
- message: 'Choose the programming language of your new Actor:',
92
- default: PROGRAMMING_LANGUAGES[0],
93
- choices: PROGRAMMING_LANGUAGES,
94
- loop: false,
95
- }]);
96
- return answer.programmingLanguage;
97
- }
98
- async function promptTemplateDefinition(manifest, programmingLanguage) {
99
- const choices = [
100
- ...manifest.templates
101
- .filter((t) => {
102
- return t.category.toLowerCase() === programmingLanguage.toLowerCase();
103
- })
104
- .map((t) => {
105
- return {
106
- name: t.label,
107
- value: t,
108
- };
109
- }),
110
- new inquirer.Separator(),
111
- {
112
- name: 'Go back',
113
- value: false,
114
- },
115
- ];
116
- const answer = await inquirer.prompt([{
117
- type: 'list',
118
- name: 'templateDefinition',
119
- message: 'Choose a template for your new Actor. Detailed information about the template will be shown in the next step.',
120
- default: choices[0],
121
- choices,
122
- loop: false,
123
- pageSize: 8,
124
- }]);
125
- return answer.templateDefinition;
126
- }
127
- async function promptTemplateInstallation(templateDefinition) {
128
- const choices = [
129
- { name: `Install template`, value: true },
130
- new inquirer.Separator(),
131
- { name: 'Go back', value: false },
132
- ];
133
- const message = 'Do you want to install the following template?';
134
- const label = chalk.underline(templateDefinition.label);
135
- const description = chalk.dim(templateDefinition.description);
136
- const suffix = `\n ${label}:\n ${description}`;
137
- const answer = await inquirer.prompt([{
138
- type: 'list',
139
- name: 'shouldInstall',
140
- message,
141
- suffix,
142
- default: choices[0],
143
- choices,
144
- loop: false,
145
- }]);
146
- return answer.shouldInstall;
147
- }
148
- //# sourceMappingURL=create-utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-utils.js","sourceRoot":"","sources":["../../src/lib/create-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEzD,MAAM,qBAAqB,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM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,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,IAAI,EAAE;QACzC,IAAI,QAAQ,CAAC,SAAS,EAAE;QACxB,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE;KACpC,CAAC;IAEF,MAAM,OAAO,GAAG,gDAAgD,CAAC;IACjE,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACxD,MAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC9D,MAAM,MAAM,GAAG,MAAM,KAAK,OAAO,WAAW,EAAE,CAAC;IAE/C,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,CAAC;YAClC,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,eAAe;YACrB,OAAO;YACP,MAAM;YACN,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;YACnB,OAAO;YACP,IAAI,EAAE,KAAK;SACd,CAAC,CAAC,CAAC;IAEJ,OAAO,MAAM,CAAC,aAAwB,CAAC;AAC3C,CAAC"}
@@ -1,3 +0,0 @@
1
- import { SpawnOptionsWithoutStdio } from 'node:child_process';
2
- export declare function execWithLog(cmd: string, args?: string[], opts?: SpawnOptionsWithoutStdio): Promise<void>;
3
- //# sourceMappingURL=exec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../src/lib/exec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,wBAAwB,EAAS,MAAM,oBAAoB,CAAC;AAuCnF,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,EAAO,EAAE,IAAI,GAAE,wBAA6B,iBAGtG"}
package/dist/lib/exec.js DELETED
@@ -1,40 +0,0 @@
1
- import { spawn } from 'node:child_process';
2
- import { run } from './outputs.js';
3
- const windowsOptions = {
4
- shell: true,
5
- windowsHide: true,
6
- };
7
- /**
8
- * Run child process and returns stdout and stderr to user stout
9
- */
10
- const spawnPromised = async (cmd, args, opts) => {
11
- // NOTE: Pipes stderr, stdout to main process
12
- const childProcess = spawn(cmd, args, {
13
- ...opts,
14
- stdio: process.env.APIFY_NO_LOGS_IN_TESTS ? 'ignore' : 'inherit',
15
- ...(process.platform === 'win32' ? windowsOptions : {}),
16
- });
17
- // Catch ctrl-c (SIGINT) and kills child process
18
- // NOTE: This fix kills also puppeteer child node process
19
- process.on('SIGINT', () => {
20
- try {
21
- childProcess.kill();
22
- }
23
- catch {
24
- // SIGINT can come after the child process is finished, ignore it
25
- }
26
- });
27
- return new Promise((resolve, reject) => {
28
- childProcess.on('error', reject);
29
- childProcess.on('close', (code) => {
30
- if (code !== 0)
31
- reject(new Error(`${cmd} exited with code ${code}`));
32
- resolve();
33
- });
34
- });
35
- };
36
- export async function execWithLog(cmd, args = [], opts = {}) {
37
- run({ message: `${cmd} ${args.join(' ')}` });
38
- await spawnPromised(cmd, args, opts);
39
- }
40
- //# sourceMappingURL=exec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exec.js","sourceRoot":"","sources":["../../src/lib/exec.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEnF,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,MAAM,cAAc,GAAiB;IACjC,KAAK,EAAE,IAAI;IACX,WAAW,EAAE,IAAI;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,aAAa,GAAG,KAAK,EAAE,GAAW,EAAE,IAAc,EAAE,IAA8B,EAAE,EAAE;IACxF,6CAA6C;IAC7C,MAAM,YAAY,GAAG,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE;QAClC,GAAG,IAAI;QACP,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;QAChE,GAAG,CAAC,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1D,CAAC,CAAC;IAEH,gDAAgD;IAChD,yDAAyD;IACzD,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QACtB,IAAI,CAAC;YACD,YAAY,CAAC,IAAI,EAAE,CAAC;QACxB,CAAC;QAAC,MAAM,CAAC;YACL,iEAAiE;QACrE,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACzC,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACjC,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;YAC9B,IAAI,IAAI,KAAK,CAAC;gBAAE,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,GAAG,qBAAqB,IAAI,EAAE,CAAC,CAAC,CAAC;YACrE,OAAO,EAAE,CAAC;QACd,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,GAAW,EAAE,OAAiB,EAAE,EAAE,OAAiC,EAAE;IACnG,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;IAC7C,MAAM,aAAa,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACzC,CAAC"}
@@ -1,14 +0,0 @@
1
- export declare const updateLocalJson: (jsonFilePath: string, updateAttrs?: Record<string, unknown>, nestedObjectAttr?: null) => Promise<void>;
2
- /**
3
- * If you pass /foo/bar as rootPath and /baz/raz as folderPath then it ensures that following folders exists:
4
- *
5
- * /foo/bar/baz
6
- * /foo/bar/baz/raz
7
- *
8
- * If you pass only one parameter then rootPath is considered to be '.'
9
- */
10
- export declare const ensureFolderExistsSync: (rootPath: string, folderPath?: string) => void;
11
- export declare const rimrafPromised: (pathToBeRemoved: string | string[]) => Promise<void>;
12
- export declare const deleteFile: (filePath: string) => Promise<void>;
13
- export declare const sumFilesSizeInBytes: (pathToFiles: string[], cwd: string) => Promise<number>;
14
- //# sourceMappingURL=files.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/lib/files.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,eAAe,iBAAwB,MAAM,gBAAe,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,2CAa/F,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,aAAc,MAAM,eAAe,MAAM,SAgB3E,CAAC;AAEF,eAAO,MAAM,cAAc,oBAA2B,MAAM,GAAG,MAAM,EAAE,kBAEtE,CAAC;AAEF,eAAO,MAAM,UAAU,aAAoB,MAAM,kBAKhD,CAAC;AAEF,eAAO,MAAM,mBAAmB,gBAAuB,MAAM,EAAE,OAAO,MAAM,oBAQ3E,CAAC"}
package/dist/lib/files.js DELETED
@@ -1,58 +0,0 @@
1
- import { existsSync, mkdirSync } from 'node:fs';
2
- import { stat, unlink } from 'node:fs/promises';
3
- import { join, sep } from 'node:path';
4
- import { loadJsonFile } from 'load-json-file';
5
- import { rimraf } from 'rimraf';
6
- import { writeJsonFile } from 'write-json-file';
7
- export const updateLocalJson = async (jsonFilePath, updateAttrs = {}, nestedObjectAttr = null) => {
8
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9
- const currentObject = await loadJsonFile(jsonFilePath);
10
- let newObject;
11
- if (nestedObjectAttr) {
12
- newObject = currentObject;
13
- newObject[nestedObjectAttr] = { ...currentObject[nestedObjectAttr], ...updateAttrs };
14
- }
15
- else {
16
- newObject = { ...currentObject, ...updateAttrs };
17
- }
18
- await writeJsonFile(jsonFilePath, newObject);
19
- };
20
- /**
21
- * If you pass /foo/bar as rootPath and /baz/raz as folderPath then it ensures that following folders exists:
22
- *
23
- * /foo/bar/baz
24
- * /foo/bar/baz/raz
25
- *
26
- * If you pass only one parameter then rootPath is considered to be '.'
27
- */
28
- export const ensureFolderExistsSync = (rootPath, folderPath) => {
29
- if (!folderPath) {
30
- folderPath = rootPath;
31
- rootPath = '.';
32
- }
33
- const parts = folderPath.split(sep);
34
- parts.reduce((currentPath, currentDir) => {
35
- currentPath = join(currentPath, currentDir);
36
- if (!existsSync(currentPath)) {
37
- mkdirSync(currentPath);
38
- }
39
- return currentPath;
40
- }, rootPath);
41
- };
42
- export const rimrafPromised = async (pathToBeRemoved) => {
43
- await rimraf(pathToBeRemoved);
44
- };
45
- export const deleteFile = async (filePath) => {
46
- const res = await stat(filePath);
47
- if (res.isFile()) {
48
- await unlink(filePath);
49
- }
50
- };
51
- export const sumFilesSizeInBytes = async (pathToFiles, cwd) => {
52
- const filesStats = await Promise.all(pathToFiles.map(async (filePath) => stat(join(cwd, filePath))));
53
- const filesSizeBytes = filesStats
54
- .map((stats) => stats.size)
55
- .reduce((sum, fileSize) => sum + fileSize, 0);
56
- return filesSizeBytes;
57
- };
58
- //# sourceMappingURL=files.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/lib/files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAAE,YAAoB,EAAE,cAA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AAU,GAAG,KAAK,EAAE,QAAgB,EAAE,EAAE;IACjD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjC,IAAI,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC;QACf,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,EAAE,WAAqB,EAAE,GAAW,EAAE,EAAE;IAC5E,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IAErG,MAAM,cAAc,GAAG,UAAU;SAC5B,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;SAC1B,MAAM,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,CAAC,GAAG,GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC;IAElD,OAAO,cAAc,CAAC;AAC1B,CAAC,CAAC"}
@@ -1,28 +0,0 @@
1
- /**
2
- * Return the input schema from the default location.
3
- *
4
- * When the input schema does not exist, null is returned for schema.
5
- * In such a case, path would be set to the location
6
- * where the input schema would be expected to be found (and e.g. can be created there).
7
- */
8
- export declare const readInputSchema: ({ forcePath, cwd }?: {
9
- forcePath?: string;
10
- cwd: string;
11
- }) => Promise<{
12
- inputSchema: Record<string, unknown> | undefined;
13
- inputSchemaPath: string;
14
- } | {
15
- inputSchema: Record<string, unknown>;
16
- inputSchemaPath: null;
17
- } | {
18
- inputSchema: null;
19
- inputSchemaPath: string;
20
- }>;
21
- /**
22
- * Goes to the Actor directory and creates INPUT.json file from the input schema prefills.
23
-
24
- */
25
- export declare const createPrefilledInputFileFromInputSchema: (actorFolderDir: string) => Promise<void>;
26
- export declare const getDefaultsAndPrefillsFromInputSchema: (inputSchema: any) => Record<string, unknown>;
27
- export declare const getAjvValidator: (inputSchema: any, ajvInstance: import("ajv").Ajv) => import("ajv").ValidateFunction<unknown>;
28
- //# sourceMappingURL=input_schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input_schema.d.ts","sourceRoot":"","sources":["../../src/lib/input_schema.ts"],"names":[],"mappings":"AAoBA;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,wBAA8B;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE;;;;iBAY/C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;EAiCpE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uCAAuC,mBAA0B,MAAM,kBA0BnF,CAAC;AAEF,eAAO,MAAM,qCAAqC,gBAAiB,GAAG,4BAYrE,CAAC;AAGF,eAAO,MAAM,eAAe,gBAAiB,GAAG,eAAe,OAAO,KAAK,EAAE,GAAG,4CAsB/E,CAAC"}