@walkeros/cli 3.4.1 → 3.4.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.
- package/CHANGELOG.md +29 -0
- package/dist/cli.js +353 -126
- package/dist/index.d.ts +429 -332
- package/dist/index.js +293 -36
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -608,7 +608,59 @@ interface LoginCommandOptions extends GlobalOptions {
|
|
|
608
608
|
url?: string;
|
|
609
609
|
json?: boolean;
|
|
610
610
|
}
|
|
611
|
+
interface DeviceCodeResult {
|
|
612
|
+
deviceCode: string;
|
|
613
|
+
userCode: string;
|
|
614
|
+
verificationUri: string;
|
|
615
|
+
verificationUriComplete?: string;
|
|
616
|
+
expiresIn: number;
|
|
617
|
+
interval: number;
|
|
618
|
+
}
|
|
619
|
+
interface DeviceCodeOptions {
|
|
620
|
+
url?: string;
|
|
621
|
+
fetch?: typeof globalThis.fetch;
|
|
622
|
+
}
|
|
623
|
+
interface PollOptions {
|
|
624
|
+
url?: string;
|
|
625
|
+
fetch?: typeof globalThis.fetch;
|
|
626
|
+
/** Timeout in milliseconds. Defaults to 60000 (60s). */
|
|
627
|
+
timeoutMs?: number;
|
|
628
|
+
/** Poll interval in milliseconds. Defaults to 5000. */
|
|
629
|
+
intervalMs?: number;
|
|
630
|
+
}
|
|
631
|
+
type PollResult = {
|
|
632
|
+
success: true;
|
|
633
|
+
status: 'authenticated';
|
|
634
|
+
email: string;
|
|
635
|
+
configPath: string;
|
|
636
|
+
} | {
|
|
637
|
+
success: false;
|
|
638
|
+
status: 'pending';
|
|
639
|
+
} | {
|
|
640
|
+
success: false;
|
|
641
|
+
status: 'error';
|
|
642
|
+
error: string;
|
|
643
|
+
};
|
|
611
644
|
declare function loginCommand(options: LoginCommandOptions): Promise<void>;
|
|
645
|
+
/**
|
|
646
|
+
* Request a device code from the auth server.
|
|
647
|
+
* First step of the device code flow — returns data needed to show
|
|
648
|
+
* the user a code and URL, then poll for the token.
|
|
649
|
+
*/
|
|
650
|
+
declare function requestDeviceCode(options?: DeviceCodeOptions): Promise<DeviceCodeResult>;
|
|
651
|
+
/**
|
|
652
|
+
* Poll the auth server until the device code is authorized, times out, or fails.
|
|
653
|
+
* Second step of the device code flow.
|
|
654
|
+
*
|
|
655
|
+
* On success: writes config and returns authenticated result.
|
|
656
|
+
* On timeout: returns pending (NOT an error — caller can retry).
|
|
657
|
+
* On real error (denied, expired): returns error result.
|
|
658
|
+
*
|
|
659
|
+
* In-flight fetch requests are bounded by the remaining time to the deadline
|
|
660
|
+
* via AbortController, so a hanging fetch cannot exceed the configured timeout.
|
|
661
|
+
* Malformed JSON responses return an error result instead of throwing.
|
|
662
|
+
*/
|
|
663
|
+
declare function pollForToken(deviceCode: string, options?: PollOptions): Promise<PollResult>;
|
|
612
664
|
|
|
613
665
|
interface LogoutCommandOptions extends GlobalOptions {
|
|
614
666
|
json?: boolean;
|
|
@@ -679,326 +731,6 @@ declare function createProjectCommand(name: string, options: ProjectsCommandOpti
|
|
|
679
731
|
declare function updateProjectCommand(projectId: string | undefined, options: ProjectsCommandOptions): Promise<void>;
|
|
680
732
|
declare function deleteProjectCommand(projectId: string | undefined, options: ProjectsCommandOptions): Promise<void>;
|
|
681
733
|
|
|
682
|
-
interface ListFlowsOptions {
|
|
683
|
-
projectId?: string;
|
|
684
|
-
sort?: 'name' | 'updated_at' | 'created_at';
|
|
685
|
-
order?: 'asc' | 'desc';
|
|
686
|
-
includeDeleted?: boolean;
|
|
687
|
-
}
|
|
688
|
-
declare function listFlows(options?: ListFlowsOptions): Promise<{
|
|
689
|
-
flows: {
|
|
690
|
-
id: string;
|
|
691
|
-
name: string;
|
|
692
|
-
summary?: string | undefined;
|
|
693
|
-
settings?: {
|
|
694
|
-
id: string;
|
|
695
|
-
name: string;
|
|
696
|
-
platform: "web" | "server";
|
|
697
|
-
deploymentStatus: string | null;
|
|
698
|
-
deploymentUrl: string | null;
|
|
699
|
-
}[] | undefined;
|
|
700
|
-
createdAt: string;
|
|
701
|
-
updatedAt: string;
|
|
702
|
-
deletedAt: string | null;
|
|
703
|
-
}[];
|
|
704
|
-
total: number;
|
|
705
|
-
}>;
|
|
706
|
-
declare function getFlow(options: {
|
|
707
|
-
flowId: string;
|
|
708
|
-
projectId?: string;
|
|
709
|
-
fields?: string[];
|
|
710
|
-
}): Promise<{
|
|
711
|
-
id: string;
|
|
712
|
-
name: string;
|
|
713
|
-
config: {
|
|
714
|
-
[x: string]: unknown;
|
|
715
|
-
version: 3;
|
|
716
|
-
$schema?: string | undefined;
|
|
717
|
-
include?: string[] | undefined;
|
|
718
|
-
variables?: {
|
|
719
|
-
[x: string]: string | number | boolean;
|
|
720
|
-
} | undefined;
|
|
721
|
-
definitions?: {
|
|
722
|
-
[x: string]: unknown;
|
|
723
|
-
} | undefined;
|
|
724
|
-
flows?: {
|
|
725
|
-
[x: string]: unknown;
|
|
726
|
-
} | undefined;
|
|
727
|
-
contract?: {
|
|
728
|
-
[x: string]: unknown;
|
|
729
|
-
} | undefined;
|
|
730
|
-
};
|
|
731
|
-
settings?: {
|
|
732
|
-
id: string;
|
|
733
|
-
name: string;
|
|
734
|
-
platform: "web" | "server";
|
|
735
|
-
deployment: {
|
|
736
|
-
id: string;
|
|
737
|
-
slug: string;
|
|
738
|
-
status: string;
|
|
739
|
-
type: string;
|
|
740
|
-
target: string | null;
|
|
741
|
-
containerUrl: string | null;
|
|
742
|
-
createdAt: string;
|
|
743
|
-
updatedAt: string | null;
|
|
744
|
-
} | null;
|
|
745
|
-
createdAt: string;
|
|
746
|
-
updatedAt: string;
|
|
747
|
-
}[] | undefined;
|
|
748
|
-
createdAt: string;
|
|
749
|
-
updatedAt: string;
|
|
750
|
-
deletedAt: string | null;
|
|
751
|
-
}>;
|
|
752
|
-
declare function createFlow(options: {
|
|
753
|
-
name: string;
|
|
754
|
-
content: Record<string, unknown>;
|
|
755
|
-
projectId?: string;
|
|
756
|
-
}): Promise<{
|
|
757
|
-
id: string;
|
|
758
|
-
name: string;
|
|
759
|
-
config: {
|
|
760
|
-
[x: string]: unknown;
|
|
761
|
-
version: 3;
|
|
762
|
-
$schema?: string | undefined;
|
|
763
|
-
include?: string[] | undefined;
|
|
764
|
-
variables?: {
|
|
765
|
-
[x: string]: string | number | boolean;
|
|
766
|
-
} | undefined;
|
|
767
|
-
definitions?: {
|
|
768
|
-
[x: string]: unknown;
|
|
769
|
-
} | undefined;
|
|
770
|
-
flows?: {
|
|
771
|
-
[x: string]: unknown;
|
|
772
|
-
} | undefined;
|
|
773
|
-
contract?: {
|
|
774
|
-
[x: string]: unknown;
|
|
775
|
-
} | undefined;
|
|
776
|
-
};
|
|
777
|
-
settings?: {
|
|
778
|
-
id: string;
|
|
779
|
-
name: string;
|
|
780
|
-
platform: "web" | "server";
|
|
781
|
-
createdAt: string;
|
|
782
|
-
updatedAt: string;
|
|
783
|
-
}[] | undefined;
|
|
784
|
-
createdAt: string;
|
|
785
|
-
updatedAt: string;
|
|
786
|
-
deletedAt?: string | null | undefined;
|
|
787
|
-
}>;
|
|
788
|
-
declare function updateFlow(options: {
|
|
789
|
-
flowId: string;
|
|
790
|
-
name?: string;
|
|
791
|
-
content?: Record<string, unknown>;
|
|
792
|
-
projectId?: string;
|
|
793
|
-
mergePatch?: boolean;
|
|
794
|
-
}): Promise<{
|
|
795
|
-
id: string;
|
|
796
|
-
name: string;
|
|
797
|
-
config: {
|
|
798
|
-
[x: string]: unknown;
|
|
799
|
-
version: 3;
|
|
800
|
-
$schema?: string | undefined;
|
|
801
|
-
include?: string[] | undefined;
|
|
802
|
-
variables?: {
|
|
803
|
-
[x: string]: string | number | boolean;
|
|
804
|
-
} | undefined;
|
|
805
|
-
definitions?: {
|
|
806
|
-
[x: string]: unknown;
|
|
807
|
-
} | undefined;
|
|
808
|
-
flows?: {
|
|
809
|
-
[x: string]: unknown;
|
|
810
|
-
} | undefined;
|
|
811
|
-
contract?: {
|
|
812
|
-
[x: string]: unknown;
|
|
813
|
-
} | undefined;
|
|
814
|
-
};
|
|
815
|
-
createdAt: string;
|
|
816
|
-
updatedAt: string;
|
|
817
|
-
} | undefined>;
|
|
818
|
-
declare function deleteFlow(options: {
|
|
819
|
-
flowId: string;
|
|
820
|
-
projectId?: string;
|
|
821
|
-
}): Promise<{
|
|
822
|
-
success: boolean;
|
|
823
|
-
}>;
|
|
824
|
-
declare function duplicateFlow(options: {
|
|
825
|
-
flowId: string;
|
|
826
|
-
name?: string;
|
|
827
|
-
projectId?: string;
|
|
828
|
-
}): Promise<{
|
|
829
|
-
id: string;
|
|
830
|
-
name: string;
|
|
831
|
-
config: {
|
|
832
|
-
[x: string]: unknown;
|
|
833
|
-
version: 3;
|
|
834
|
-
$schema?: string | undefined;
|
|
835
|
-
include?: string[] | undefined;
|
|
836
|
-
variables?: {
|
|
837
|
-
[x: string]: string | number | boolean;
|
|
838
|
-
} | undefined;
|
|
839
|
-
definitions?: {
|
|
840
|
-
[x: string]: unknown;
|
|
841
|
-
} | undefined;
|
|
842
|
-
flows?: {
|
|
843
|
-
[x: string]: unknown;
|
|
844
|
-
} | undefined;
|
|
845
|
-
contract?: {
|
|
846
|
-
[x: string]: unknown;
|
|
847
|
-
} | undefined;
|
|
848
|
-
};
|
|
849
|
-
settings?: {
|
|
850
|
-
id: string;
|
|
851
|
-
name: string;
|
|
852
|
-
platform: "web" | "server";
|
|
853
|
-
createdAt: string;
|
|
854
|
-
updatedAt: string;
|
|
855
|
-
}[] | undefined;
|
|
856
|
-
createdAt: string;
|
|
857
|
-
updatedAt: string;
|
|
858
|
-
deletedAt?: string | null | undefined;
|
|
859
|
-
}>;
|
|
860
|
-
interface FlowsCommandOptions extends GlobalOptions {
|
|
861
|
-
json?: boolean;
|
|
862
|
-
output?: string;
|
|
863
|
-
project?: string;
|
|
864
|
-
}
|
|
865
|
-
declare function listFlowsCommand(options: FlowsCommandOptions & {
|
|
866
|
-
sort?: string;
|
|
867
|
-
order?: string;
|
|
868
|
-
includeDeleted?: boolean;
|
|
869
|
-
}): Promise<void>;
|
|
870
|
-
declare function getFlowCommand(flowId: string, options: FlowsCommandOptions): Promise<void>;
|
|
871
|
-
declare function createFlowCommand(name: string, options: FlowsCommandOptions & {
|
|
872
|
-
content?: string;
|
|
873
|
-
}): Promise<void>;
|
|
874
|
-
declare function updateFlowCommand(flowId: string, options: FlowsCommandOptions & {
|
|
875
|
-
name?: string;
|
|
876
|
-
content?: string;
|
|
877
|
-
}): Promise<void>;
|
|
878
|
-
declare function deleteFlowCommand(flowId: string, options: FlowsCommandOptions): Promise<void>;
|
|
879
|
-
declare function duplicateFlowCommand(flowId: string, options: FlowsCommandOptions & {
|
|
880
|
-
name?: string;
|
|
881
|
-
}): Promise<void>;
|
|
882
|
-
|
|
883
|
-
interface DeployOptions {
|
|
884
|
-
flowId: string;
|
|
885
|
-
projectId?: string;
|
|
886
|
-
wait?: boolean;
|
|
887
|
-
flowName?: string;
|
|
888
|
-
timeout?: number;
|
|
889
|
-
signal?: AbortSignal;
|
|
890
|
-
onStatus?: (status: string, substatus: string | null) => void;
|
|
891
|
-
}
|
|
892
|
-
declare function deploy(options: DeployOptions): Promise<any>;
|
|
893
|
-
declare function getDeployment(options: {
|
|
894
|
-
flowId: string;
|
|
895
|
-
projectId?: string;
|
|
896
|
-
flowName?: string;
|
|
897
|
-
}): Promise<any>;
|
|
898
|
-
interface DeployCommandOptions extends GlobalOptions {
|
|
899
|
-
project?: string;
|
|
900
|
-
flow?: string;
|
|
901
|
-
wait?: boolean;
|
|
902
|
-
timeout?: string;
|
|
903
|
-
output?: string;
|
|
904
|
-
json?: boolean;
|
|
905
|
-
}
|
|
906
|
-
declare function deployCommand(flowId: string, options: DeployCommandOptions): Promise<void>;
|
|
907
|
-
declare function getDeploymentCommand(flowId: string, options: DeployCommandOptions): Promise<void>;
|
|
908
|
-
|
|
909
|
-
interface ListDeploymentsOptions {
|
|
910
|
-
projectId?: string;
|
|
911
|
-
type?: 'web' | 'server';
|
|
912
|
-
status?: string;
|
|
913
|
-
}
|
|
914
|
-
declare function listDeployments(options?: ListDeploymentsOptions): Promise<any>;
|
|
915
|
-
declare function getDeploymentBySlug(options: {
|
|
916
|
-
slug: string;
|
|
917
|
-
projectId?: string;
|
|
918
|
-
}): Promise<any>;
|
|
919
|
-
declare function createDeployment(options: {
|
|
920
|
-
type: 'web' | 'server';
|
|
921
|
-
label?: string;
|
|
922
|
-
projectId?: string;
|
|
923
|
-
}): Promise<any>;
|
|
924
|
-
declare function deleteDeployment(options: {
|
|
925
|
-
slug: string;
|
|
926
|
-
projectId?: string;
|
|
927
|
-
}): Promise<any>;
|
|
928
|
-
interface DeploymentsCommandOptions extends GlobalOptions {
|
|
929
|
-
json?: boolean;
|
|
930
|
-
output?: string;
|
|
931
|
-
project?: string;
|
|
932
|
-
type?: string;
|
|
933
|
-
status?: string;
|
|
934
|
-
label?: string;
|
|
935
|
-
}
|
|
936
|
-
declare function listDeploymentsCommand(options: DeploymentsCommandOptions): Promise<void>;
|
|
937
|
-
declare function getDeploymentBySlugCommand(slug: string, options: DeploymentsCommandOptions): Promise<void>;
|
|
938
|
-
declare function createDeploymentCommand(options: DeploymentsCommandOptions): Promise<void>;
|
|
939
|
-
declare function deleteDeploymentCommand(slug: string, options: DeploymentsCommandOptions): Promise<void>;
|
|
940
|
-
declare function createDeployCommand(config: string | undefined, options: DeploymentsCommandOptions & {
|
|
941
|
-
flow?: string;
|
|
942
|
-
}): Promise<void>;
|
|
943
|
-
|
|
944
|
-
interface FeedbackOptions {
|
|
945
|
-
anonymous?: boolean;
|
|
946
|
-
version?: string;
|
|
947
|
-
}
|
|
948
|
-
declare function feedback(text: string, options?: FeedbackOptions): Promise<void>;
|
|
949
|
-
declare function feedbackCommand(text: string): Promise<void>;
|
|
950
|
-
|
|
951
|
-
/**
|
|
952
|
-
* Publish-time wrap step.
|
|
953
|
-
*
|
|
954
|
-
* Takes a Stage 1 ESM skeleton produced via `bundle({ skipWrapper: true })`
|
|
955
|
-
* and produces a wrapped output:
|
|
956
|
-
* - `browser`: self-executing async IIFE that calls
|
|
957
|
-
* `startFlow(wireConfig(__configData))` and optionally assigns the
|
|
958
|
-
* resulting collector/elb onto `window`.
|
|
959
|
-
* - `node`: ESM module whose default export is an async factory function
|
|
960
|
-
* that the runtime container (see `runtime/load-bundle.ts:53-66`) calls
|
|
961
|
-
* with a context to get back `{ collector, elb, httpHandler? }`.
|
|
962
|
-
*
|
|
963
|
-
* The skeleton must export `wireConfig`, `startFlow`, and `__configData`.
|
|
964
|
-
* The skipWrapper branch of `bundleCore` already emits exactly that shape.
|
|
965
|
-
*/
|
|
966
|
-
|
|
967
|
-
interface WrapSkeletonOptions {
|
|
968
|
-
/**
|
|
969
|
-
* Absolute path to the Stage 1 skeleton ESM file. Must export
|
|
970
|
-
* `wireConfig`, `startFlow`, and `__configData`.
|
|
971
|
-
*/
|
|
972
|
-
skeletonPath: string;
|
|
973
|
-
/** Target platform — controls which entry generator runs. */
|
|
974
|
-
platform: 'browser' | 'node';
|
|
975
|
-
/** Absolute path where the wrapped output will be written. */
|
|
976
|
-
outputPath: string;
|
|
977
|
-
/**
|
|
978
|
-
* Browser-only: window property name for the collector.
|
|
979
|
-
* When unset, no `window.*` assignment is emitted.
|
|
980
|
-
*/
|
|
981
|
-
windowCollector?: string;
|
|
982
|
-
/**
|
|
983
|
-
* Browser-only: window property name for the elb function.
|
|
984
|
-
* When unset, no `window.*` assignment is emitted.
|
|
985
|
-
*/
|
|
986
|
-
windowElb?: string;
|
|
987
|
-
/** Browser-only: CDN hostname for loading preview bundles. */
|
|
988
|
-
previewOrigin?: string;
|
|
989
|
-
/** Browser-only: project scope for preview URL isolation. */
|
|
990
|
-
previewScope?: string;
|
|
991
|
-
/**
|
|
992
|
-
* esbuild target. @default 'es2018' for browser, 'node18' for node.
|
|
993
|
-
*/
|
|
994
|
-
target?: string;
|
|
995
|
-
/** Whether to minify the output. @default true */
|
|
996
|
-
minify?: boolean;
|
|
997
|
-
/** Fine-grained minification options, forwarded to esbuild. */
|
|
998
|
-
minifyOptions?: MinifyOptions;
|
|
999
|
-
}
|
|
1000
|
-
declare function wrapSkeleton(options: WrapSkeletonOptions): Promise<void>;
|
|
1001
|
-
|
|
1002
734
|
/**
|
|
1003
735
|
* This file was auto-generated by openapi-typescript.
|
|
1004
736
|
* Do not make direct changes to the file.
|
|
@@ -5124,20 +4856,351 @@ interface components {
|
|
|
5124
4856
|
ttlMs: number;
|
|
5125
4857
|
};
|
|
5126
4858
|
};
|
|
5127
|
-
ValidateTicketRequest: {
|
|
5128
|
-
ticket: string;
|
|
4859
|
+
ValidateTicketRequest: {
|
|
4860
|
+
ticket: string;
|
|
4861
|
+
};
|
|
4862
|
+
HealthResponse: {
|
|
4863
|
+
/** @example ok */
|
|
4864
|
+
status: string;
|
|
4865
|
+
};
|
|
4866
|
+
};
|
|
4867
|
+
responses: never;
|
|
4868
|
+
parameters: never;
|
|
4869
|
+
requestBodies: never;
|
|
4870
|
+
headers: never;
|
|
4871
|
+
pathItems: never;
|
|
4872
|
+
}
|
|
4873
|
+
|
|
4874
|
+
type FlowSummary = paths['/api/projects/{projectId}/flows']['get']['responses']['200']['content']['application/json']['flows'][number];
|
|
4875
|
+
type Project = paths['/api/projects']['get']['responses']['200']['content']['application/json']['projects'][number];
|
|
4876
|
+
interface ProjectFlows {
|
|
4877
|
+
project: {
|
|
4878
|
+
id: Project['id'];
|
|
4879
|
+
name: Project['name'];
|
|
4880
|
+
};
|
|
4881
|
+
flows: FlowSummary[];
|
|
4882
|
+
}
|
|
4883
|
+
interface ListFlowsOptions {
|
|
4884
|
+
projectId?: string;
|
|
4885
|
+
sort?: 'name' | 'updated_at' | 'created_at';
|
|
4886
|
+
order?: 'asc' | 'desc';
|
|
4887
|
+
includeDeleted?: boolean;
|
|
4888
|
+
}
|
|
4889
|
+
declare function listFlows(options?: ListFlowsOptions): Promise<{
|
|
4890
|
+
flows: {
|
|
4891
|
+
id: string;
|
|
4892
|
+
name: string;
|
|
4893
|
+
summary?: string | undefined;
|
|
4894
|
+
settings?: {
|
|
4895
|
+
id: string;
|
|
4896
|
+
name: string;
|
|
4897
|
+
platform: "web" | "server";
|
|
4898
|
+
deploymentStatus: string | null;
|
|
4899
|
+
deploymentUrl: string | null;
|
|
4900
|
+
}[] | undefined;
|
|
4901
|
+
createdAt: string;
|
|
4902
|
+
updatedAt: string;
|
|
4903
|
+
deletedAt: string | null;
|
|
4904
|
+
}[];
|
|
4905
|
+
total: number;
|
|
4906
|
+
}>;
|
|
4907
|
+
declare function listAllFlows(options?: Omit<ListFlowsOptions, 'projectId'>): Promise<ProjectFlows[]>;
|
|
4908
|
+
declare function getFlow(options: {
|
|
4909
|
+
flowId: string;
|
|
4910
|
+
projectId?: string;
|
|
4911
|
+
fields?: string[];
|
|
4912
|
+
}): Promise<{
|
|
4913
|
+
id: string;
|
|
4914
|
+
name: string;
|
|
4915
|
+
config: {
|
|
4916
|
+
[x: string]: unknown;
|
|
4917
|
+
version: 3;
|
|
4918
|
+
$schema?: string | undefined;
|
|
4919
|
+
include?: string[] | undefined;
|
|
4920
|
+
variables?: {
|
|
4921
|
+
[x: string]: string | number | boolean;
|
|
4922
|
+
} | undefined;
|
|
4923
|
+
definitions?: {
|
|
4924
|
+
[x: string]: unknown;
|
|
4925
|
+
} | undefined;
|
|
4926
|
+
flows?: {
|
|
4927
|
+
[x: string]: unknown;
|
|
4928
|
+
} | undefined;
|
|
4929
|
+
contract?: {
|
|
4930
|
+
[x: string]: unknown;
|
|
4931
|
+
} | undefined;
|
|
4932
|
+
};
|
|
4933
|
+
settings?: {
|
|
4934
|
+
id: string;
|
|
4935
|
+
name: string;
|
|
4936
|
+
platform: "web" | "server";
|
|
4937
|
+
deployment: {
|
|
4938
|
+
id: string;
|
|
4939
|
+
slug: string;
|
|
4940
|
+
status: string;
|
|
4941
|
+
type: string;
|
|
4942
|
+
target: string | null;
|
|
4943
|
+
containerUrl: string | null;
|
|
4944
|
+
createdAt: string;
|
|
4945
|
+
updatedAt: string | null;
|
|
4946
|
+
} | null;
|
|
4947
|
+
createdAt: string;
|
|
4948
|
+
updatedAt: string;
|
|
4949
|
+
}[] | undefined;
|
|
4950
|
+
createdAt: string;
|
|
4951
|
+
updatedAt: string;
|
|
4952
|
+
deletedAt: string | null;
|
|
4953
|
+
}>;
|
|
4954
|
+
declare function createFlow(options: {
|
|
4955
|
+
name: string;
|
|
4956
|
+
content: Record<string, unknown>;
|
|
4957
|
+
projectId?: string;
|
|
4958
|
+
}): Promise<{
|
|
4959
|
+
id: string;
|
|
4960
|
+
name: string;
|
|
4961
|
+
config: {
|
|
4962
|
+
[x: string]: unknown;
|
|
4963
|
+
version: 3;
|
|
4964
|
+
$schema?: string | undefined;
|
|
4965
|
+
include?: string[] | undefined;
|
|
4966
|
+
variables?: {
|
|
4967
|
+
[x: string]: string | number | boolean;
|
|
4968
|
+
} | undefined;
|
|
4969
|
+
definitions?: {
|
|
4970
|
+
[x: string]: unknown;
|
|
4971
|
+
} | undefined;
|
|
4972
|
+
flows?: {
|
|
4973
|
+
[x: string]: unknown;
|
|
4974
|
+
} | undefined;
|
|
4975
|
+
contract?: {
|
|
4976
|
+
[x: string]: unknown;
|
|
4977
|
+
} | undefined;
|
|
4978
|
+
};
|
|
4979
|
+
settings?: {
|
|
4980
|
+
id: string;
|
|
4981
|
+
name: string;
|
|
4982
|
+
platform: "web" | "server";
|
|
4983
|
+
createdAt: string;
|
|
4984
|
+
updatedAt: string;
|
|
4985
|
+
}[] | undefined;
|
|
4986
|
+
createdAt: string;
|
|
4987
|
+
updatedAt: string;
|
|
4988
|
+
deletedAt?: string | null | undefined;
|
|
4989
|
+
}>;
|
|
4990
|
+
declare function updateFlow(options: {
|
|
4991
|
+
flowId: string;
|
|
4992
|
+
name?: string;
|
|
4993
|
+
content?: Record<string, unknown>;
|
|
4994
|
+
projectId?: string;
|
|
4995
|
+
mergePatch?: boolean;
|
|
4996
|
+
}): Promise<{
|
|
4997
|
+
id: string;
|
|
4998
|
+
name: string;
|
|
4999
|
+
config: {
|
|
5000
|
+
[x: string]: unknown;
|
|
5001
|
+
version: 3;
|
|
5002
|
+
$schema?: string | undefined;
|
|
5003
|
+
include?: string[] | undefined;
|
|
5004
|
+
variables?: {
|
|
5005
|
+
[x: string]: string | number | boolean;
|
|
5006
|
+
} | undefined;
|
|
5007
|
+
definitions?: {
|
|
5008
|
+
[x: string]: unknown;
|
|
5009
|
+
} | undefined;
|
|
5010
|
+
flows?: {
|
|
5011
|
+
[x: string]: unknown;
|
|
5012
|
+
} | undefined;
|
|
5013
|
+
contract?: {
|
|
5014
|
+
[x: string]: unknown;
|
|
5015
|
+
} | undefined;
|
|
5129
5016
|
};
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5017
|
+
createdAt: string;
|
|
5018
|
+
updatedAt: string;
|
|
5019
|
+
} | undefined>;
|
|
5020
|
+
declare function deleteFlow(options: {
|
|
5021
|
+
flowId: string;
|
|
5022
|
+
projectId?: string;
|
|
5023
|
+
}): Promise<{
|
|
5024
|
+
success: boolean;
|
|
5025
|
+
}>;
|
|
5026
|
+
declare function duplicateFlow(options: {
|
|
5027
|
+
flowId: string;
|
|
5028
|
+
name?: string;
|
|
5029
|
+
projectId?: string;
|
|
5030
|
+
}): Promise<{
|
|
5031
|
+
id: string;
|
|
5032
|
+
name: string;
|
|
5033
|
+
config: {
|
|
5034
|
+
[x: string]: unknown;
|
|
5035
|
+
version: 3;
|
|
5036
|
+
$schema?: string | undefined;
|
|
5037
|
+
include?: string[] | undefined;
|
|
5038
|
+
variables?: {
|
|
5039
|
+
[x: string]: string | number | boolean;
|
|
5040
|
+
} | undefined;
|
|
5041
|
+
definitions?: {
|
|
5042
|
+
[x: string]: unknown;
|
|
5043
|
+
} | undefined;
|
|
5044
|
+
flows?: {
|
|
5045
|
+
[x: string]: unknown;
|
|
5046
|
+
} | undefined;
|
|
5047
|
+
contract?: {
|
|
5048
|
+
[x: string]: unknown;
|
|
5049
|
+
} | undefined;
|
|
5133
5050
|
};
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5051
|
+
settings?: {
|
|
5052
|
+
id: string;
|
|
5053
|
+
name: string;
|
|
5054
|
+
platform: "web" | "server";
|
|
5055
|
+
createdAt: string;
|
|
5056
|
+
updatedAt: string;
|
|
5057
|
+
}[] | undefined;
|
|
5058
|
+
createdAt: string;
|
|
5059
|
+
updatedAt: string;
|
|
5060
|
+
deletedAt?: string | null | undefined;
|
|
5061
|
+
}>;
|
|
5062
|
+
interface FlowsCommandOptions extends GlobalOptions {
|
|
5063
|
+
json?: boolean;
|
|
5064
|
+
output?: string;
|
|
5065
|
+
project?: string;
|
|
5066
|
+
}
|
|
5067
|
+
declare function listFlowsCommand(options: FlowsCommandOptions & {
|
|
5068
|
+
sort?: string;
|
|
5069
|
+
order?: string;
|
|
5070
|
+
includeDeleted?: boolean;
|
|
5071
|
+
}): Promise<void>;
|
|
5072
|
+
declare function getFlowCommand(flowId: string, options: FlowsCommandOptions): Promise<void>;
|
|
5073
|
+
declare function createFlowCommand(name: string, options: FlowsCommandOptions & {
|
|
5074
|
+
content?: string;
|
|
5075
|
+
}): Promise<void>;
|
|
5076
|
+
declare function updateFlowCommand(flowId: string, options: FlowsCommandOptions & {
|
|
5077
|
+
name?: string;
|
|
5078
|
+
content?: string;
|
|
5079
|
+
}): Promise<void>;
|
|
5080
|
+
declare function deleteFlowCommand(flowId: string, options: FlowsCommandOptions): Promise<void>;
|
|
5081
|
+
declare function duplicateFlowCommand(flowId: string, options: FlowsCommandOptions & {
|
|
5082
|
+
name?: string;
|
|
5083
|
+
}): Promise<void>;
|
|
5084
|
+
|
|
5085
|
+
interface DeployOptions {
|
|
5086
|
+
flowId: string;
|
|
5087
|
+
projectId?: string;
|
|
5088
|
+
wait?: boolean;
|
|
5089
|
+
flowName?: string;
|
|
5090
|
+
timeout?: number;
|
|
5091
|
+
signal?: AbortSignal;
|
|
5092
|
+
onStatus?: (status: string, substatus: string | null) => void;
|
|
5093
|
+
}
|
|
5094
|
+
declare function deploy(options: DeployOptions): Promise<any>;
|
|
5095
|
+
declare function getDeployment(options: {
|
|
5096
|
+
flowId: string;
|
|
5097
|
+
projectId?: string;
|
|
5098
|
+
flowName?: string;
|
|
5099
|
+
}): Promise<any>;
|
|
5100
|
+
interface DeployCommandOptions extends GlobalOptions {
|
|
5101
|
+
project?: string;
|
|
5102
|
+
flow?: string;
|
|
5103
|
+
wait?: boolean;
|
|
5104
|
+
timeout?: string;
|
|
5105
|
+
output?: string;
|
|
5106
|
+
json?: boolean;
|
|
5107
|
+
}
|
|
5108
|
+
declare function deployCommand(flowId: string, options: DeployCommandOptions): Promise<void>;
|
|
5109
|
+
declare function getDeploymentCommand(flowId: string, options: DeployCommandOptions): Promise<void>;
|
|
5110
|
+
|
|
5111
|
+
interface ListDeploymentsOptions {
|
|
5112
|
+
projectId?: string;
|
|
5113
|
+
type?: 'web' | 'server';
|
|
5114
|
+
status?: string;
|
|
5115
|
+
}
|
|
5116
|
+
declare function listDeployments(options?: ListDeploymentsOptions): Promise<any>;
|
|
5117
|
+
declare function getDeploymentBySlug(options: {
|
|
5118
|
+
slug: string;
|
|
5119
|
+
projectId?: string;
|
|
5120
|
+
}): Promise<any>;
|
|
5121
|
+
declare function createDeployment(options: {
|
|
5122
|
+
type: 'web' | 'server';
|
|
5123
|
+
label?: string;
|
|
5124
|
+
projectId?: string;
|
|
5125
|
+
}): Promise<any>;
|
|
5126
|
+
declare function deleteDeployment(options: {
|
|
5127
|
+
slug: string;
|
|
5128
|
+
projectId?: string;
|
|
5129
|
+
}): Promise<any>;
|
|
5130
|
+
interface DeploymentsCommandOptions extends GlobalOptions {
|
|
5131
|
+
json?: boolean;
|
|
5132
|
+
output?: string;
|
|
5133
|
+
project?: string;
|
|
5134
|
+
type?: string;
|
|
5135
|
+
status?: string;
|
|
5136
|
+
label?: string;
|
|
5137
|
+
}
|
|
5138
|
+
declare function listDeploymentsCommand(options: DeploymentsCommandOptions): Promise<void>;
|
|
5139
|
+
declare function getDeploymentBySlugCommand(slug: string, options: DeploymentsCommandOptions): Promise<void>;
|
|
5140
|
+
declare function createDeploymentCommand(options: DeploymentsCommandOptions): Promise<void>;
|
|
5141
|
+
declare function deleteDeploymentCommand(slug: string, options: DeploymentsCommandOptions): Promise<void>;
|
|
5142
|
+
declare function createDeployCommand(config: string | undefined, options: DeploymentsCommandOptions & {
|
|
5143
|
+
flow?: string;
|
|
5144
|
+
}): Promise<void>;
|
|
5145
|
+
|
|
5146
|
+
interface FeedbackOptions {
|
|
5147
|
+
anonymous?: boolean;
|
|
5148
|
+
version?: string;
|
|
5149
|
+
}
|
|
5150
|
+
declare function feedback(text: string, options?: FeedbackOptions): Promise<void>;
|
|
5151
|
+
declare function feedbackCommand(text: string): Promise<void>;
|
|
5152
|
+
|
|
5153
|
+
/**
|
|
5154
|
+
* Publish-time wrap step.
|
|
5155
|
+
*
|
|
5156
|
+
* Takes a Stage 1 ESM skeleton produced via `bundle({ skipWrapper: true })`
|
|
5157
|
+
* and produces a wrapped output:
|
|
5158
|
+
* - `browser`: self-executing async IIFE that calls `wireConfig(__configData)`,
|
|
5159
|
+
* injects `env.window` / `env.document` into every source, then calls
|
|
5160
|
+
* `startFlow(config)` and optionally assigns the resulting collector/elb
|
|
5161
|
+
* onto `window`.
|
|
5162
|
+
* - `node`: ESM module whose default export is an async factory function
|
|
5163
|
+
* that the runtime container (see `runtime/load-bundle.ts:53-66`) calls
|
|
5164
|
+
* with a context to get back `{ collector, elb, httpHandler? }`.
|
|
5165
|
+
*
|
|
5166
|
+
* The skeleton must export `wireConfig`, `startFlow`, and `__configData`.
|
|
5167
|
+
* The skipWrapper branch of `bundleCore` already emits exactly that shape.
|
|
5168
|
+
*/
|
|
5169
|
+
|
|
5170
|
+
interface WrapSkeletonOptions {
|
|
5171
|
+
/**
|
|
5172
|
+
* Absolute path to the Stage 1 skeleton ESM file. Must export
|
|
5173
|
+
* `wireConfig`, `startFlow`, and `__configData`.
|
|
5174
|
+
*/
|
|
5175
|
+
skeletonPath: string;
|
|
5176
|
+
/** Target platform — controls which entry generator runs. */
|
|
5177
|
+
platform: 'browser' | 'node';
|
|
5178
|
+
/** Absolute path where the wrapped output will be written. */
|
|
5179
|
+
outputPath: string;
|
|
5180
|
+
/**
|
|
5181
|
+
* Browser-only: window property name for the collector.
|
|
5182
|
+
* When unset, no `window.*` assignment is emitted.
|
|
5183
|
+
*/
|
|
5184
|
+
windowCollector?: string;
|
|
5185
|
+
/**
|
|
5186
|
+
* Browser-only: window property name for the elb function.
|
|
5187
|
+
* When unset, no `window.*` assignment is emitted.
|
|
5188
|
+
*/
|
|
5189
|
+
windowElb?: string;
|
|
5190
|
+
/** Browser-only: CDN hostname for loading preview bundles. */
|
|
5191
|
+
previewOrigin?: string;
|
|
5192
|
+
/** Browser-only: project scope for preview URL isolation. */
|
|
5193
|
+
previewScope?: string;
|
|
5194
|
+
/**
|
|
5195
|
+
* esbuild target. @default 'es2018' for browser, 'node18' for node.
|
|
5196
|
+
*/
|
|
5197
|
+
target?: string;
|
|
5198
|
+
/** Whether to minify the output. @default true */
|
|
5199
|
+
minify?: boolean;
|
|
5200
|
+
/** Fine-grained minification options, forwarded to esbuild. */
|
|
5201
|
+
minifyOptions?: MinifyOptions;
|
|
5140
5202
|
}
|
|
5203
|
+
declare function wrapSkeleton(options: WrapSkeletonOptions): Promise<void>;
|
|
5141
5204
|
|
|
5142
5205
|
declare function createApiClient(): openapi_fetch.Client<paths, `${string}/${string}`>;
|
|
5143
5206
|
|
|
@@ -5227,6 +5290,7 @@ interface WalkerOSConfig {
|
|
|
5227
5290
|
email: string;
|
|
5228
5291
|
appUrl: string;
|
|
5229
5292
|
anonymousFeedback?: boolean;
|
|
5293
|
+
defaultProjectId?: string;
|
|
5230
5294
|
}
|
|
5231
5295
|
/**
|
|
5232
5296
|
* Read the stored config, or null if not found
|
|
@@ -5236,6 +5300,39 @@ declare function readConfig(): WalkerOSConfig | null;
|
|
|
5236
5300
|
* Write config to disk with 0600 permissions
|
|
5237
5301
|
*/
|
|
5238
5302
|
declare function writeConfig(config: WalkerOSConfig): void;
|
|
5303
|
+
/**
|
|
5304
|
+
* Delete the config file (logout)
|
|
5305
|
+
*/
|
|
5306
|
+
declare function deleteConfig(): boolean;
|
|
5307
|
+
/**
|
|
5308
|
+
* Set the anonymous feedback preference in the config.
|
|
5309
|
+
* Does nothing when no config exists (avoids creating a skeleton config).
|
|
5310
|
+
*/
|
|
5311
|
+
declare function setFeedbackPreference(anonymous: boolean): void;
|
|
5312
|
+
/**
|
|
5313
|
+
* Get the anonymous feedback preference from the config.
|
|
5314
|
+
* Returns undefined when not set or no config exists.
|
|
5315
|
+
*/
|
|
5316
|
+
declare function getFeedbackPreference(): boolean | undefined;
|
|
5317
|
+
/**
|
|
5318
|
+
* Set the default project ID in the config.
|
|
5319
|
+
* Throws if no config exists (user not authenticated).
|
|
5320
|
+
*/
|
|
5321
|
+
declare function setDefaultProject(projectId: string): void;
|
|
5322
|
+
/**
|
|
5323
|
+
* Get the default project ID from the config, or null if not set.
|
|
5324
|
+
*/
|
|
5325
|
+
declare function getDefaultProject(): string | null;
|
|
5326
|
+
/**
|
|
5327
|
+
* Resolve the API token using priority order:
|
|
5328
|
+
* 1. WALKEROS_TOKEN env var
|
|
5329
|
+
* 2. Config file (~/.config/walkeros/config.json)
|
|
5330
|
+
* 3. null (not authenticated)
|
|
5331
|
+
*/
|
|
5332
|
+
declare function resolveToken(): {
|
|
5333
|
+
token: string;
|
|
5334
|
+
source: 'env' | 'config';
|
|
5335
|
+
} | null;
|
|
5239
5336
|
|
|
5240
5337
|
/**
|
|
5241
5338
|
* Load configuration from a file path, URL, or inline string.
|
|
@@ -5383,4 +5480,4 @@ interface PreparedFlow {
|
|
|
5383
5480
|
cleanup: () => Promise<void>;
|
|
5384
5481
|
}
|
|
5385
5482
|
|
|
5386
|
-
export { ApiError, type ApiErrorDetail, type BuildOptions, type BundleStats, type CLIBuildOptions, type ClientContext, type ClientType, type CreatePreviewOptions, type DeletePreviewOptions, type DeployOptions, type ExampleLookupResult, type FeedbackOptions, type GetPreviewOptions, type GlobalOptions, type ListDeploymentsOptions, type ListFlowsOptions, type ListPreviewsOptions, type MinifyOptions, type PrepareInput, type PreparedFlow, type PushResult, type RunCommandOptions, type RunOptions, type RunResult, type SSEEvent, type SSEParseResult, type SimulateDestinationOptions, type SimulateSourceOptions, type SimulateTransformerOptions, type ValidateResult, type ValidationError, type ValidationType, type ValidationWarning, type WalkerOSConfig, type WrapSkeletonOptions, apiFetch, bundle, bundleCommand, bundleRemote, clientContextHeaders, compareOutput, createApiClient, createDeployCommand, createDeployment, createDeploymentCommand, createFlow, createFlowCommand, createPreview, createProject, createProjectCommand, deleteDeployment, deleteDeploymentCommand, deleteFlow, deleteFlowCommand, deletePreview, deleteProject, deleteProjectCommand, deploy, deployCommand, deployFetch, duplicateFlow, duplicateFlowCommand, feedback, feedbackCommand, findExample, getAuthHeaders, getClientContext, getDeployment, getDeploymentBySlug, getDeploymentBySlugCommand, getDeploymentCommand, getFlow, getFlowCommand, getPreview, getProject, getProjectCommand, getToken, listDeployments, listDeploymentsCommand, listFlows, listFlowsCommand, listPreviews, listProjects, listProjectsCommand, loadConfig, loadJsonConfig, loginCommand, logoutCommand, mergeAuthHeaders, parseSSEEvents, publicFetch, push, pushCommand, readConfig, requireProjectId, resetClientContext, run, runCommand, setClientContext, simulateDestination, simulateSource, simulateTransformer, throwApiError, updateFlow, updateFlowCommand, updateProject, updateProjectCommand, validate, validateCommand, whoami, whoamiCommand, wrapSkeleton, writeConfig };
|
|
5483
|
+
export { ApiError, type ApiErrorDetail, type BuildOptions, type BundleStats, type CLIBuildOptions, type ClientContext, type ClientType, type CreatePreviewOptions, type DeletePreviewOptions, type DeployOptions, type DeviceCodeOptions, type DeviceCodeResult, type ExampleLookupResult, type FeedbackOptions, type GetPreviewOptions, type GlobalOptions, type ListDeploymentsOptions, type ListFlowsOptions, type ListPreviewsOptions, type MinifyOptions, type PollOptions, type PollResult, type PrepareInput, type PreparedFlow, type ProjectFlows, type PushResult, type RunCommandOptions, type RunOptions, type RunResult, type SSEEvent, type SSEParseResult, type SimulateDestinationOptions, type SimulateSourceOptions, type SimulateTransformerOptions, type ValidateResult, type ValidationError, type ValidationType, type ValidationWarning, type WalkerOSConfig, type WrapSkeletonOptions, apiFetch, bundle, bundleCommand, bundleRemote, clientContextHeaders, compareOutput, createApiClient, createDeployCommand, createDeployment, createDeploymentCommand, createFlow, createFlowCommand, createPreview, createProject, createProjectCommand, deleteConfig, deleteDeployment, deleteDeploymentCommand, deleteFlow, deleteFlowCommand, deletePreview, deleteProject, deleteProjectCommand, deploy, deployCommand, deployFetch, duplicateFlow, duplicateFlowCommand, feedback, feedbackCommand, findExample, getAuthHeaders, getClientContext, getDefaultProject, getDeployment, getDeploymentBySlug, getDeploymentBySlugCommand, getDeploymentCommand, getFeedbackPreference, getFlow, getFlowCommand, getPreview, getProject, getProjectCommand, getToken, listAllFlows, listDeployments, listDeploymentsCommand, listFlows, listFlowsCommand, listPreviews, listProjects, listProjectsCommand, loadConfig, loadJsonConfig, loginCommand, logoutCommand, mergeAuthHeaders, parseSSEEvents, pollForToken, publicFetch, push, pushCommand, readConfig, requestDeviceCode, requireProjectId, resetClientContext, resolveToken, run, runCommand, setClientContext, setDefaultProject, setFeedbackPreference, simulateDestination, simulateSource, simulateTransformer, throwApiError, updateFlow, updateFlowCommand, updateProject, updateProjectCommand, validate, validateCommand, whoami, whoamiCommand, wrapSkeleton, writeConfig };
|