@workflow/cli 4.0.1-beta.6 → 4.0.1-beta.8
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/LICENSE.md +201 -21
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +1 -2
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/inspect.d.ts.map +1 -1
- package/dist/commands/inspect.js +21 -4
- package/dist/commands/inspect.js.map +1 -1
- package/dist/lib/config/types.d.ts +3 -15
- package/dist/lib/config/types.d.ts.map +1 -1
- package/dist/lib/config/types.js +1 -8
- package/dist/lib/config/types.js.map +1 -1
- package/dist/lib/inspect/output.d.ts +1 -0
- package/dist/lib/inspect/output.d.ts.map +1 -1
- package/dist/lib/inspect/output.js +105 -1
- package/dist/lib/inspect/output.js.map +1 -1
- package/package.json +12 -14
- package/dist/lib/builders/apply-swc-transform.d.ts +0 -24
- package/dist/lib/builders/apply-swc-transform.d.ts.map +0 -1
- package/dist/lib/builders/apply-swc-transform.js +0 -38
- package/dist/lib/builders/apply-swc-transform.js.map +0 -1
- package/dist/lib/builders/base-builder.d.ts +0 -45
- package/dist/lib/builders/base-builder.d.ts.map +0 -1
- package/dist/lib/builders/base-builder.js +0 -466
- package/dist/lib/builders/base-builder.js.map +0 -1
- package/dist/lib/builders/discover-entries-esbuild-plugin.d.ts +0 -11
- package/dist/lib/builders/discover-entries-esbuild-plugin.d.ts.map +0 -1
- package/dist/lib/builders/discover-entries-esbuild-plugin.js +0 -84
- package/dist/lib/builders/discover-entries-esbuild-plugin.js.map +0 -1
- package/dist/lib/builders/next-build.d.ts +0 -11
- package/dist/lib/builders/next-build.d.ts.map +0 -1
- package/dist/lib/builders/next-build.js +0 -331
- package/dist/lib/builders/next-build.js.map +0 -1
- package/dist/lib/builders/node-module-esbuild-plugin.d.ts +0 -3
- package/dist/lib/builders/node-module-esbuild-plugin.d.ts.map +0 -1
- package/dist/lib/builders/node-module-esbuild-plugin.js +0 -24
- package/dist/lib/builders/node-module-esbuild-plugin.js.map +0 -1
- package/dist/lib/builders/node-module-esbuild-plugin.test.d.ts +0 -2
- package/dist/lib/builders/node-module-esbuild-plugin.test.d.ts.map +0 -1
- package/dist/lib/builders/node-module-esbuild-plugin.test.js +0 -128
- package/dist/lib/builders/node-module-esbuild-plugin.test.js.map +0 -1
- package/dist/lib/builders/standalone.d.ts +0 -8
- package/dist/lib/builders/standalone.d.ts.map +0 -1
- package/dist/lib/builders/standalone.js +0 -52
- package/dist/lib/builders/standalone.js.map +0 -1
- package/dist/lib/builders/swc-esbuild-plugin.d.ts +0 -12
- package/dist/lib/builders/swc-esbuild-plugin.d.ts.map +0 -1
- package/dist/lib/builders/swc-esbuild-plugin.js +0 -134
- package/dist/lib/builders/swc-esbuild-plugin.js.map +0 -1
- package/dist/lib/builders/vercel-build-output-api.d.ts +0 -9
- package/dist/lib/builders/vercel-build-output-api.d.ts.map +0 -1
- package/dist/lib/builders/vercel-build-output-api.js +0 -138
- package/dist/lib/builders/vercel-build-output-api.js.map +0 -1
- package/dist/lib/builders/webhook-route.test.d.ts +0 -2
- package/dist/lib/builders/webhook-route.test.d.ts.map +0 -1
- package/dist/lib/builders/webhook-route.test.js +0 -206
- package/dist/lib/builders/webhook-route.test.js.map +0 -1
package/LICENSE.md
CHANGED
|
@@ -1,21 +1,201 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
<http://www.apache.org/licenses/>
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2025 Vercel Inc.
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAIzC,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,WAAW;IAC5C,MAAM,CAAC,WAAW,SAA2C;IAE7D,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;MAYV;IAEF,MAAM,CAAC,IAAI;;MAKT;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA4DlC"}
|
package/dist/commands/build.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { StandaloneBuilder, VercelBuildOutputAPIBuilder, } from '@workflow/builders';
|
|
2
3
|
import { BaseCommand } from '../base.js';
|
|
3
|
-
import { VercelBuildOutputAPIBuilder } from '../lib/builders/vercel-build-output-api.js';
|
|
4
|
-
import { StandaloneBuilder } from '../lib/builders/standalone.js';
|
|
5
4
|
import { isValidBuildTarget } from '../lib/config/types.js';
|
|
6
5
|
import { getWorkflowConfig } from '../lib/config/workflow-config.js';
|
|
7
6
|
export default class Build extends BaseCommand {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"A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,IAAI,CAAC,KAAK,CAAC,yBAAyB,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;YAC5D,CAAC;YAED,IAAI,CAAC,OAAO,CAAC,+BAA+B,CAAC,CAAC;QAChD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,KAAK,CACR,iBACE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,EAAE,CACH,CAAC;QACJ,CAAC;IACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../src/commands/inspect.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../src/commands/inspect.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAmBzC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,WAAW;IAC9C,MAAM,CAAC,WAAW,SAA6C;IAE/D,MAAM,CAAC,OAAO,WAAS;IAEvB,MAAM,CAAC,QAAQ,WAOb;IAEI,KAAK,CAAC,KAAK,EAAE,GAAG;IAetB,MAAM,CAAC,IAAI;;;MA+BA;IAEX,MAAM,CAAC,KAAK;;;;;;;;;;;;;;;;;;MA6CD;IAEE,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAmGlC"}
|
package/dist/commands/inspect.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Args, Flags } from '@oclif/core';
|
|
|
2
2
|
import { BaseCommand } from '../base.js';
|
|
3
3
|
import { LOGGING_CONFIG, logger } from '../lib/config/log.js';
|
|
4
4
|
import { cliFlags } from '../lib/inspect/flags.js';
|
|
5
|
-
import { listEvents, listHooks, listRuns, listSteps, listStreams, showHook, showRun, showStep, showStream, } from '../lib/inspect/output.js';
|
|
5
|
+
import { listEvents, listHooks, listRuns, listSleeps, listSteps, listStreams, showHook, showRun, showStep, showStream, } from '../lib/inspect/output.js';
|
|
6
6
|
import { setupCliWorld } from '../lib/inspect/setup.js';
|
|
7
7
|
import { launchWebUI } from '../lib/inspect/web.js';
|
|
8
8
|
export default class Inspect extends BaseCommand {
|
|
@@ -14,6 +14,7 @@ export default class Inspect extends BaseCommand {
|
|
|
14
14
|
'$ workflow inspect events --step=step_01K5WAJZ8W367CV2RFKDSDNWB8',
|
|
15
15
|
'$ workflow inspect hooks',
|
|
16
16
|
'$ workflow inspect hook hook_01K5WAJZ8W367CV2RFKDSDNWB8',
|
|
17
|
+
'$ workflow inspect sleeps --runId=run_01K5WAJZ8W367CV2RFKDSDNWB8',
|
|
17
18
|
];
|
|
18
19
|
async catch(error) {
|
|
19
20
|
// Check if this is a 403 error from the Vercel backend
|
|
@@ -32,7 +33,7 @@ export default class Inspect extends BaseCommand {
|
|
|
32
33
|
}
|
|
33
34
|
static args = {
|
|
34
35
|
resource: Args.string({
|
|
35
|
-
description: 'what to inspect: run(s) | step(s) | stream(s) | event(s) | hook(s)',
|
|
36
|
+
description: 'what to inspect: run(s) | step(s) | stream(s) | event(s) | hook(s) | sleep(s)',
|
|
36
37
|
required: true,
|
|
37
38
|
options: [
|
|
38
39
|
'r',
|
|
@@ -52,6 +53,8 @@ export default class Inspect extends BaseCommand {
|
|
|
52
53
|
'hooks',
|
|
53
54
|
'w',
|
|
54
55
|
'web',
|
|
56
|
+
'sleep',
|
|
57
|
+
'sleeps',
|
|
55
58
|
],
|
|
56
59
|
}),
|
|
57
60
|
id: Args.string({
|
|
@@ -61,7 +64,7 @@ export default class Inspect extends BaseCommand {
|
|
|
61
64
|
};
|
|
62
65
|
static flags = {
|
|
63
66
|
runId: Flags.string({
|
|
64
|
-
description: 'run ID to filter by (
|
|
67
|
+
description: 'run ID to filter by (optional for steps, events, and hooks, required for sleeps)',
|
|
65
68
|
required: false,
|
|
66
69
|
char: 'r',
|
|
67
70
|
aliases: ['run'],
|
|
@@ -109,7 +112,7 @@ export default class Inspect extends BaseCommand {
|
|
|
109
112
|
const { args, flags } = await this.parse(Inspect);
|
|
110
113
|
const resource = normalizeResource(args.resource);
|
|
111
114
|
if (!resource) {
|
|
112
|
-
this.logError(`Unknown resource "${args.resource}": must be one of: run(s), step(s), stream(s), event(s), hook(s)`);
|
|
115
|
+
this.logError(`Unknown resource "${args.resource}": must be one of: run(s), step(s), stream(s), event(s), hook(s), sleep(s)`);
|
|
113
116
|
process.exit(1);
|
|
114
117
|
}
|
|
115
118
|
const id = args.id;
|
|
@@ -166,6 +169,18 @@ export default class Inspect extends BaseCommand {
|
|
|
166
169
|
}
|
|
167
170
|
process.exit(0);
|
|
168
171
|
}
|
|
172
|
+
if (resource === 'sleep') {
|
|
173
|
+
if (id) {
|
|
174
|
+
this.logError('Sleep-ID is not supported for sleeps. Filter by run-id instead. Usage: `workflow inspect sleeps --runId=<id>`');
|
|
175
|
+
process.exit(1);
|
|
176
|
+
}
|
|
177
|
+
if (!flags.runId) {
|
|
178
|
+
this.logError('run-id is required for listing sleeps. Usage: `workflow inspect sleeps --runId=<id>`');
|
|
179
|
+
process.exit(1);
|
|
180
|
+
}
|
|
181
|
+
await listSleeps(world, options);
|
|
182
|
+
process.exit(0);
|
|
183
|
+
}
|
|
169
184
|
this.logError(`Unknown resource: ${resource}. Usage: ${Inspect.examples.join('\n')}`);
|
|
170
185
|
process.exit(1);
|
|
171
186
|
}
|
|
@@ -198,6 +213,8 @@ function normalizeResource(value) {
|
|
|
198
213
|
return 'event';
|
|
199
214
|
if (v.startsWith('str'))
|
|
200
215
|
return 'stream';
|
|
216
|
+
if (v.startsWith('sl'))
|
|
217
|
+
return 'sleep';
|
|
201
218
|
if (v.startsWith('s'))
|
|
202
219
|
return 'step';
|
|
203
220
|
if (v.startsWith('h'))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspect.js","sourceRoot":"","sources":["../../src/commands/inspect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;QAAE,OAAO,SAAS,CAAC;IAC7B,MAAM,CAAC,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IAC9B,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IACpC,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,OAAO,CAAC;IACtC,IAAI,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC;QAAE,OAAO,QAAQ,CAAC;IACzC,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,OAAO,CAAC;IACvC,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,MAAM,CAAC;IACrC,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,MAAM,CAAC;IACrC,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IACpC,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type { BuildTarget, WorkflowConfig, } from '@workflow/builders';
|
|
2
|
+
export { isValidBuildTarget, validBuildTargets, } from '@workflow/builders';
|
|
3
3
|
export type InspectCLIOptions = {
|
|
4
4
|
json?: boolean;
|
|
5
5
|
watch?: boolean;
|
|
@@ -12,18 +12,6 @@ export type InspectCLIOptions = {
|
|
|
12
12
|
workflowName?: string;
|
|
13
13
|
withData?: boolean;
|
|
14
14
|
backend?: string;
|
|
15
|
+
disableRelativeDates?: boolean;
|
|
15
16
|
};
|
|
16
|
-
export interface WorkflowConfig {
|
|
17
|
-
watch?: boolean;
|
|
18
|
-
dirs: string[];
|
|
19
|
-
workingDir: string;
|
|
20
|
-
buildTarget: BuildTarget;
|
|
21
|
-
stepsBundlePath: string;
|
|
22
|
-
workflowsBundlePath: string;
|
|
23
|
-
webhookBundlePath: string;
|
|
24
|
-
clientBundlePath?: string;
|
|
25
|
-
externalPackages?: string[];
|
|
26
|
-
workflowManifestPath?: string;
|
|
27
|
-
}
|
|
28
|
-
export declare function isValidBuildTarget(target: string | undefined): target is BuildTarget;
|
|
29
17
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/config/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/config/types.ts"],"names":[],"mappings":"AACA,YAAY,EACV,WAAW,EACX,cAAc,GACf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC"}
|
package/dist/lib/config/types.js
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
'standalone',
|
|
3
|
-
'vercel-build-output-api',
|
|
4
|
-
'next',
|
|
5
|
-
];
|
|
6
|
-
export function isValidBuildTarget(target) {
|
|
7
|
-
return target === 'standalone' || target === 'vercel-build-output-api';
|
|
8
|
-
}
|
|
1
|
+
export { isValidBuildTarget, validBuildTargets, } from '@workflow/builders';
|
|
9
2
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/lib/config/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/lib/config/types.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC"}
|
|
@@ -28,4 +28,5 @@ export declare const listStreams: (world: World, opts?: InspectCLIOptions) => Pr
|
|
|
28
28
|
export declare const listEvents: (world: World, opts?: InspectCLIOptions) => Promise<void>;
|
|
29
29
|
export declare const listHooks: (world: World, opts?: InspectCLIOptions) => Promise<void>;
|
|
30
30
|
export declare const showHook: (world: World, hookId: string, opts?: InspectCLIOptions) => Promise<void>;
|
|
31
|
+
export declare const listSleeps: (world: World, opts?: InspectCLIOptions) => Promise<void>;
|
|
31
32
|
//# sourceMappingURL=output.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../src/lib/inspect/output.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAOV,KAAK,EACN,MAAM,iBAAiB,CAAC;AAKzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../src/lib/inspect/output.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAOV,KAAK,EACN,MAAM,iBAAiB,CAAC;AAKzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAse5D,eAAO,MAAM,QAAQ,GAAU,OAAO,KAAK,EAAE,OAAM,iBAAsB,kBAqExE,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,OAAO,KAAK,EACZ,OAAM,iBAAsB;;;;;;;;;;;;;;EAgB7B,CAAC;AAEF,eAAO,MAAM,OAAO,GAClB,OAAO,KAAK,EACZ,OAAO,MAAM,EACb,OAAM,iBAAsB,kBAoB7B,CAAC;AAEF,eAAO,MAAM,SAAS,GACpB,OAAO,KAAK,EACZ,OAAM,iBAEL,kBAmFF,CAAC;AAEF,eAAO,MAAM,QAAQ,GACnB,OAAO,KAAK,EACZ,QAAQ,MAAM,EACd,OAAM,iBAAsB,kBA2B7B,CAAC;AAEF,eAAO,MAAM,UAAU,GACrB,GAAG,KAAK,EACR,UAAU,MAAM,EAChB,OAAM,iBAAsB,kBAc7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,GACtB,OAAO,KAAK,EACZ,OAAM,iBAAsB,kBA0G7B,CAAC;AAmDF,eAAO,MAAM,UAAU,GACrB,OAAO,KAAK,EACZ,OAAM,iBAAsB,kBAmF7B,CAAC;AAEF,eAAO,MAAM,SAAS,GAAU,OAAO,KAAK,EAAE,OAAM,iBAAsB,kBAgFzE,CAAC;AAEF,eAAO,MAAM,QAAQ,GACnB,OAAO,KAAK,EACZ,QAAQ,MAAM,EACd,OAAM,iBAAsB,kBAsB7B,CAAC;AAEF,eAAO,MAAM,UAAU,GACrB,OAAO,KAAK,EACZ,OAAM,iBAAsB,kBA6H7B,CAAC"}
|
|
@@ -45,6 +45,13 @@ const HOOK_LISTED_PROPS = [
|
|
|
45
45
|
'createdAt',
|
|
46
46
|
// ...HOOK_DATA_PROPS,
|
|
47
47
|
];
|
|
48
|
+
const WAIT_LISTED_PROPS = [
|
|
49
|
+
'correlationId',
|
|
50
|
+
'eventId',
|
|
51
|
+
'createdAt',
|
|
52
|
+
'resumeAt',
|
|
53
|
+
'completedAt',
|
|
54
|
+
];
|
|
48
55
|
const STATUS_COLORS = {
|
|
49
56
|
running: chalk.blue,
|
|
50
57
|
completed: chalk.green,
|
|
@@ -285,10 +292,12 @@ const formatTableTimestamp = (value, opts = {}, displaySettings) => {
|
|
|
285
292
|
// - Display settings allow it (based on terminal width)
|
|
286
293
|
// - withData is disabled (more space available)
|
|
287
294
|
// - Not in JSON mode
|
|
295
|
+
// - disableRelativeDates is not set
|
|
288
296
|
const shouldShowRelative = !isCI() &&
|
|
289
297
|
displaySettings?.showRelativeDates !== false &&
|
|
290
298
|
!opts.withData &&
|
|
291
|
-
!opts.json
|
|
299
|
+
!opts.json &&
|
|
300
|
+
!opts.disableRelativeDates;
|
|
292
301
|
if (shouldShowRelative) {
|
|
293
302
|
const relative = formatDistance(value, new Date(), { addSuffix: true });
|
|
294
303
|
return `${isoTime} (${relative})`;
|
|
@@ -899,4 +908,99 @@ export const showHook = async (world, hookId, opts = {}) => {
|
|
|
899
908
|
throw error;
|
|
900
909
|
}
|
|
901
910
|
};
|
|
911
|
+
export const listSleeps = async (world, opts = {}) => {
|
|
912
|
+
if (!opts.runId) {
|
|
913
|
+
logger.error('run-id is required for listing sleeps. Usage: `workflow inspect sleeps --runId=<id>`');
|
|
914
|
+
process.exit(1);
|
|
915
|
+
}
|
|
916
|
+
if (opts.stepId) {
|
|
917
|
+
logger.warn('Filtering by step-id is not supported for sleeps, ignoring filter.');
|
|
918
|
+
}
|
|
919
|
+
if (opts.workflowName) {
|
|
920
|
+
logger.warn('Filtering by workflow-name is not supported for sleeps, ignoring filter.');
|
|
921
|
+
}
|
|
922
|
+
if (opts.withData) {
|
|
923
|
+
logger.warn('`withData` flag is ignored when listing sleeps');
|
|
924
|
+
}
|
|
925
|
+
try {
|
|
926
|
+
// Fetch all events for the run with resolveData=false
|
|
927
|
+
const events = await world.events.list({
|
|
928
|
+
runId: opts.runId,
|
|
929
|
+
pagination: {
|
|
930
|
+
sortOrder: opts.sort || 'desc',
|
|
931
|
+
limit: 1000,
|
|
932
|
+
},
|
|
933
|
+
resolveData: 'none',
|
|
934
|
+
});
|
|
935
|
+
// Show info message if there might be more sleeps
|
|
936
|
+
if (events.hasMore) {
|
|
937
|
+
logger.info('Warning: This run has more than 1000 events. Some sleeps might not be shown. Please use the web UI to ensure getting a complete list.');
|
|
938
|
+
}
|
|
939
|
+
// Filter locally by correlationId starting with 'wait_'
|
|
940
|
+
const waitCorrelationIds = new Set();
|
|
941
|
+
for (const event of events.data) {
|
|
942
|
+
if (event.correlationId?.startsWith('wait_')) {
|
|
943
|
+
waitCorrelationIds.add(event.correlationId);
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
if (waitCorrelationIds.size === 0) {
|
|
947
|
+
logger.warn('No sleeps found for this run.');
|
|
948
|
+
if (opts.json) {
|
|
949
|
+
showJson([]);
|
|
950
|
+
}
|
|
951
|
+
else {
|
|
952
|
+
logger.log(showTable([], WAIT_LISTED_PROPS, {
|
|
953
|
+
...opts,
|
|
954
|
+
disableRelativeDates: true,
|
|
955
|
+
}));
|
|
956
|
+
}
|
|
957
|
+
return;
|
|
958
|
+
}
|
|
959
|
+
// For each unique correlationId, fetch events by correlationId with resolveData=true
|
|
960
|
+
const sleeps = [];
|
|
961
|
+
for (const correlationId of waitCorrelationIds) {
|
|
962
|
+
const correlationEvents = await world.events.listByCorrelationId({
|
|
963
|
+
correlationId,
|
|
964
|
+
pagination: {
|
|
965
|
+
sortOrder: 'asc',
|
|
966
|
+
limit: 10,
|
|
967
|
+
},
|
|
968
|
+
resolveData: 'all',
|
|
969
|
+
});
|
|
970
|
+
// Stitch up wait_created and wait_completed events
|
|
971
|
+
const waitCreated = correlationEvents.data.find((e) => e.eventType === 'wait_created');
|
|
972
|
+
const waitCompleted = correlationEvents.data.find((e) => e.eventType === 'wait_completed');
|
|
973
|
+
if (waitCreated) {
|
|
974
|
+
const sleep = {
|
|
975
|
+
correlationId,
|
|
976
|
+
runId: waitCreated.runId,
|
|
977
|
+
eventId: waitCreated.eventId,
|
|
978
|
+
createdAt: waitCreated.createdAt,
|
|
979
|
+
resumeAt: waitCreated.eventType === 'wait_created'
|
|
980
|
+
? waitCreated.eventData.resumeAt
|
|
981
|
+
: undefined,
|
|
982
|
+
completedAt: waitCompleted?.createdAt,
|
|
983
|
+
};
|
|
984
|
+
sleeps.push(sleep);
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
// Sort sleeps by createdAt
|
|
988
|
+
sleeps.sort((a, b) => {
|
|
989
|
+
const timeA = a.createdAt.getTime();
|
|
990
|
+
const timeB = b.createdAt.getTime();
|
|
991
|
+
return opts.sort === 'asc' ? timeA - timeB : timeB - timeA;
|
|
992
|
+
});
|
|
993
|
+
if (opts.json) {
|
|
994
|
+
showJson(sleeps);
|
|
995
|
+
return;
|
|
996
|
+
}
|
|
997
|
+
logger.log(showTable(sleeps, WAIT_LISTED_PROPS, { ...opts, disableRelativeDates: true }));
|
|
998
|
+
}
|
|
999
|
+
catch (error) {
|
|
1000
|
+
if (handleApiError(error, opts.backend)) {
|
|
1001
|
+
process.exit(1);
|
|
1002
|
+
}
|
|
1003
|
+
throw error;
|
|
1004
|
+
}
|
|
1005
|
+
};
|
|
902
1006
|
//# sourceMappingURL=output.js.map
|