@wallavi/vercel-build 0.1.0 → 0.1.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/dist/index.d.ts +423 -26
- package/dist/index.js +435 -38
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -92,29 +92,6 @@ declare function ejecutarIgnorar(opciones: OpcionesIgnorar): number;
|
|
|
92
92
|
declare function comandoIgnorar(args: string[], entorno: Entorno): number;
|
|
93
93
|
declare const ignorar: typeof comandoIgnorar;
|
|
94
94
|
|
|
95
|
-
declare const VARIABLES_VERCEL: readonly ["VERCEL_TOKEN", "VERCEL_ORG_ID", "VERCEL_PROJECT_ID"];
|
|
96
|
-
declare const PASOS_VERCEL: readonly (readonly string[])[];
|
|
97
|
-
interface ArgumentosDesplegar {
|
|
98
|
-
carpeta: string;
|
|
99
|
-
antes?: string;
|
|
100
|
-
}
|
|
101
|
-
declare function leerArgumentosDesplegar(args: readonly string[]): {
|
|
102
|
-
ok: true;
|
|
103
|
-
valor: ArgumentosDesplegar;
|
|
104
|
-
} | {
|
|
105
|
-
ok: false;
|
|
106
|
-
motivo: string;
|
|
107
|
-
};
|
|
108
|
-
interface OpcionesDesplegar extends Entorno {
|
|
109
|
-
carpeta: string;
|
|
110
|
-
antes?: string;
|
|
111
|
-
ejecutar?: Ejecutar;
|
|
112
|
-
evaluar?: (opciones: OpcionesCambios) => Evaluacion;
|
|
113
|
-
}
|
|
114
|
-
declare function ejecutarDesplegar(opciones: OpcionesDesplegar): number;
|
|
115
|
-
declare function comandoDesplegar(args: string[], entorno: Entorno): number;
|
|
116
|
-
declare const desplegar: typeof comandoDesplegar;
|
|
117
|
-
|
|
118
95
|
declare const API_VERCEL_URL = "https://api.vercel.com";
|
|
119
96
|
declare const LIMITE_PAGINA_VERCEL = 100;
|
|
120
97
|
declare const MAX_PAGINAS_VERCEL = 1000;
|
|
@@ -941,7 +918,8 @@ interface RespuestaHttp {
|
|
|
941
918
|
estado: number;
|
|
942
919
|
cuerpo: string;
|
|
943
920
|
}
|
|
944
|
-
type
|
|
921
|
+
type MetodoHttpVercel = "GET" | "POST";
|
|
922
|
+
type SolicitarVercel = (url: string, headers: Record<string, string>, metodo?: MetodoHttpVercel) => RespuestaHttp;
|
|
945
923
|
declare const solicitarVercel: SolicitarVercel;
|
|
946
924
|
declare function pedirJsonVercel(rutaQuery: string, token: string, solicitar?: SolicitarVercel, baseUrl?: string): {
|
|
947
925
|
estado: number;
|
|
@@ -978,6 +956,425 @@ declare function ejecutarMedir(opciones: OpcionesMedir): number;
|
|
|
978
956
|
declare function comandoMedir(args: string[], entorno: Entorno): number;
|
|
979
957
|
declare const medir: typeof comandoMedir;
|
|
980
958
|
|
|
959
|
+
declare const INTERVALO_POLL_DEPLOY_MS = 5000;
|
|
960
|
+
declare const TIMEOUT_POLL_DEPLOY_MS = 600000;
|
|
961
|
+
type Dormir = (ms: number) => void;
|
|
962
|
+
declare const dormirSincrono: Dormir;
|
|
963
|
+
declare const esquemaDeploymentPromocion: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
964
|
+
id: z.ZodOptional<z.ZodString>;
|
|
965
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
966
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
967
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
968
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
969
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
970
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
971
|
+
url: z.ZodOptional<z.ZodString>;
|
|
972
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
973
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
974
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
975
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
976
|
+
id: z.ZodOptional<z.ZodString>;
|
|
977
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
978
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
979
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
980
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
981
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
982
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
983
|
+
url: z.ZodOptional<z.ZodString>;
|
|
984
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
985
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
986
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
987
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
988
|
+
id: z.ZodOptional<z.ZodString>;
|
|
989
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
990
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
991
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
992
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
993
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
994
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
995
|
+
url: z.ZodOptional<z.ZodString>;
|
|
996
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
997
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
998
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
999
|
+
}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
|
|
1000
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1001
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1002
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1003
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1004
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1005
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1006
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1007
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1008
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1009
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1010
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1011
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1012
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1013
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1014
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1015
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1016
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1017
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1018
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1019
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1020
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1021
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1022
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1023
|
+
}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
|
|
1024
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1025
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1026
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1027
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1028
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1029
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1030
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1031
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1032
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1033
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1034
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1035
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1036
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1037
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1038
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1039
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1040
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1041
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1042
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1043
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1044
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1045
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1046
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1047
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1048
|
+
declare const esquemaListaDeploymentsPromocion: z.ZodObject<{
|
|
1049
|
+
deployments: z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
1050
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1051
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1052
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1053
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1054
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1055
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1056
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1057
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1058
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1059
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1060
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1061
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1062
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1063
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1064
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1065
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1066
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1067
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1068
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1069
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1070
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1071
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1072
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1073
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1074
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1075
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1076
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1077
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1078
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1079
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1080
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1081
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1082
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1083
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1084
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1085
|
+
}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
|
|
1086
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1087
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1088
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1089
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1090
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1091
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1092
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1093
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1094
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1095
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1096
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1097
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1098
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1099
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1100
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1101
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1102
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1103
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1104
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1105
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1106
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1107
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1108
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1109
|
+
}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
|
|
1110
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1111
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1112
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1113
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1114
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1115
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1116
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1117
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1118
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1119
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1120
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1121
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1122
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1123
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1124
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1125
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1126
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1127
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1128
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1129
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1130
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1131
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1132
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1133
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
1134
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1135
|
+
deployments: z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
1136
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1137
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1138
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1139
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1140
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1141
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1142
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1143
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1144
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1145
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1146
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1147
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1148
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1149
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1150
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1151
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1152
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1153
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1154
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1155
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1156
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1157
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1158
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1159
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1160
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1161
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1162
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1163
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1164
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1165
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1166
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1167
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1168
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1169
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1170
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1171
|
+
}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
|
|
1172
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1173
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1174
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1175
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1176
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1177
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1178
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1179
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1180
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1181
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1182
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1183
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1184
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1185
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1186
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1187
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1188
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1189
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1190
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1191
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1192
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1193
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1194
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1195
|
+
}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
|
|
1196
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1197
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1198
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1199
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1200
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1201
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1202
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1203
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1204
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1205
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1206
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1207
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1208
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1209
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1210
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1211
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1212
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1213
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1214
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1215
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1216
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1217
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1218
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1219
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
1220
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1221
|
+
deployments: z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
1222
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1223
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1224
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1225
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1226
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1227
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1228
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1229
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1230
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1231
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1232
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1233
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1234
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1235
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1236
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1237
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1238
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1239
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1240
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1241
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1242
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1243
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1244
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1245
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1246
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1247
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1248
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1249
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1250
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1251
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1252
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1253
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1254
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1255
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1256
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1257
|
+
}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
|
|
1258
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1259
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1260
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1261
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1262
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1263
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1264
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1265
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1266
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1267
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1268
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1269
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1270
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1271
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1272
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1273
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1274
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1275
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1276
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1277
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1278
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1279
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1280
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1281
|
+
}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
|
|
1282
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1283
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1284
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1285
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1286
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1287
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1288
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1289
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1290
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1291
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1292
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1293
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1294
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1295
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1296
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
1297
|
+
target: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1298
|
+
state: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1299
|
+
readyState: z.ZodOptional<z.ZodEnum<["BUILDING", "ERROR", "INITIALIZING", "QUEUED", "READY", "CANCELED"]>>;
|
|
1300
|
+
readySubstate: z.ZodOptional<z.ZodString>;
|
|
1301
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1302
|
+
alias: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodString]>>;
|
|
1303
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1304
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1305
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
1306
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1307
|
+
type DeploymentPromocion = z.infer<typeof esquemaDeploymentPromocion>;
|
|
1308
|
+
declare function limpiarIdOUrlDeploy(valor: string): string | null;
|
|
1309
|
+
declare function extraerIdOUrlDeploy(salida: string, error?: string): string | null;
|
|
1310
|
+
declare function extraerAliasProduccion(deployment: DeploymentPromocion): string | null;
|
|
1311
|
+
interface OpcionesPromover {
|
|
1312
|
+
teamId?: string;
|
|
1313
|
+
projectId?: string;
|
|
1314
|
+
token?: string;
|
|
1315
|
+
sha?: string;
|
|
1316
|
+
urlDeploy?: string | null;
|
|
1317
|
+
salidaDeploy?: string;
|
|
1318
|
+
errorDeploy?: string;
|
|
1319
|
+
cwd?: string;
|
|
1320
|
+
carpeta?: string;
|
|
1321
|
+
env?: NodeJS.ProcessEnv;
|
|
1322
|
+
ejecutar?: Ejecutar;
|
|
1323
|
+
solicitar?: SolicitarVercel;
|
|
1324
|
+
dormir?: Dormir;
|
|
1325
|
+
intervaloMs?: number;
|
|
1326
|
+
timeoutMs?: number;
|
|
1327
|
+
maxIntentos?: number;
|
|
1328
|
+
baseUrl?: string;
|
|
1329
|
+
}
|
|
1330
|
+
type ResultadoPromocion = {
|
|
1331
|
+
ok: true;
|
|
1332
|
+
codigo: 0;
|
|
1333
|
+
deploymentId: string;
|
|
1334
|
+
alias: string | null;
|
|
1335
|
+
url: string | null;
|
|
1336
|
+
} | {
|
|
1337
|
+
ok: false;
|
|
1338
|
+
codigo: 1;
|
|
1339
|
+
motivo: string;
|
|
1340
|
+
};
|
|
1341
|
+
declare function esperarYPromoverDeploy(opciones: OpcionesPromover): ResultadoPromocion;
|
|
1342
|
+
|
|
1343
|
+
declare const VARIABLES_VERCEL: readonly ["VERCEL_TOKEN", "VERCEL_ORG_ID", "VERCEL_PROJECT_ID"];
|
|
1344
|
+
declare const PASOS_VERCEL: readonly [readonly ["pull", "--yes", "--environment=production"], readonly ["build", "--prod"], readonly ["deploy", "--prebuilt", "--prod"]];
|
|
1345
|
+
declare const PASO_DEPLOY_REMOTO: readonly ["deploy", "--prod", "--yes", "--no-wait"];
|
|
1346
|
+
declare const ARCHIVO_ENV_PRODUCCION: string;
|
|
1347
|
+
interface ArgumentosDesplegar {
|
|
1348
|
+
carpeta: string;
|
|
1349
|
+
antes?: string;
|
|
1350
|
+
urlSalud?: string;
|
|
1351
|
+
}
|
|
1352
|
+
declare function leerArgumentosDesplegar(args: readonly string[]): {
|
|
1353
|
+
ok: true;
|
|
1354
|
+
valor: ArgumentosDesplegar;
|
|
1355
|
+
} | {
|
|
1356
|
+
ok: false;
|
|
1357
|
+
motivo: string;
|
|
1358
|
+
};
|
|
1359
|
+
declare function tieneVariablesSensibles(carpeta: string): boolean;
|
|
1360
|
+
declare function extraerUrlSalud(salida: string, error?: string): string | null;
|
|
1361
|
+
interface OpcionesDesplegar extends Entorno {
|
|
1362
|
+
carpeta: string;
|
|
1363
|
+
antes?: string;
|
|
1364
|
+
urlSalud?: string;
|
|
1365
|
+
ejecutar?: Ejecutar;
|
|
1366
|
+
evaluar?: (opciones: OpcionesCambios) => Evaluacion;
|
|
1367
|
+
solicitar?: SolicitarVercel;
|
|
1368
|
+
dormir?: Dormir;
|
|
1369
|
+
intervaloPollMs?: number;
|
|
1370
|
+
timeoutPollMs?: number;
|
|
1371
|
+
maxIntentosPoll?: number;
|
|
1372
|
+
baseUrl?: string;
|
|
1373
|
+
}
|
|
1374
|
+
declare function ejecutarDesplegar(opciones: OpcionesDesplegar): number;
|
|
1375
|
+
declare function comandoDesplegar(args: string[], entorno: Entorno): number;
|
|
1376
|
+
declare const desplegar: typeof comandoDesplegar;
|
|
1377
|
+
|
|
981
1378
|
declare const ARCHIVO_DEPLOYMENTS_V6 = "deployments-v6.json";
|
|
982
1379
|
declare const ARCHIVO_CAPTURA_V6 = "captura-v6.json";
|
|
983
1380
|
declare const REFERENCIA_DEPLOYMENTS_V6 = "https://vercel.com/docs/rest-api/reference/endpoints/deployments/list-deployments";
|
|
@@ -1273,7 +1670,7 @@ declare function ejecutarCapturar(opciones: OpcionesCapturar): number;
|
|
|
1273
1670
|
declare function comandoCapturar(args: string[], entorno: Entorno): number;
|
|
1274
1671
|
declare const capturar: typeof comandoCapturar;
|
|
1275
1672
|
|
|
1276
|
-
declare const USO = "Uso: wallavi-vercel <comando> [opciones]\n\nComandos:\n ignorar decide si Vercel debe omitir el build\n desplegar --carpeta <ruta> [--antes <sha>]
|
|
1673
|
+
declare const USO = "Uso: wallavi-vercel <comando> [opciones]\n\nComandos:\n ignorar decide si Vercel debe omitir el build\n desplegar --carpeta <ruta> [--antes <sha>] [--url-salud <url>] compila, despliega y verifica la salud HTTP\n medir --equipo <slug|team_id> --desde <AAAA-MM-DD> --hasta <AAAA-MM-DD> [...] calcula los minutos de build por d\u00EDa en UTC\n capturar --equipo <slug|team_id> --desde <AAAA-MM-DD> --hasta <AAAA-MM-DD> ... descarga deployments de Vercel y escribe su captura\n\nOpciones:\n -h, --help muestra esta ayuda\n";
|
|
1277
1674
|
interface Entorno {
|
|
1278
1675
|
cwd: string;
|
|
1279
1676
|
env: NodeJS.ProcessEnv;
|
|
@@ -1284,4 +1681,4 @@ type Comando = (args: string[], entorno: Entorno) => number;
|
|
|
1284
1681
|
declare const COMANDOS: Record<string, Comando>;
|
|
1285
1682
|
declare function principal(argv: string[], entorno: Entorno): number;
|
|
1286
1683
|
|
|
1287
|
-
export { API_VERCEL_URL, ARCHIVO_CAPTURA_V6, ARCHIVO_CONFIG, ARCHIVO_DEPLOYMENTS_V6, type ArgumentosCapturar, type ArgumentosDesplegar, type ArgumentosMedir, COMANDOS, type CapturaV6, type Comando, type ConfigVercelBuild, type DeploymentVercel, type DiaMinutos, ESTADOS_DEPLOYMENT, type Ejecutar, type Entorno, type EquipoVercel, ErrorContratoVercel, ErrorRedVercel, type Evaluacion, LIMITE_PAGINA_VERCEL, MAX_PAGINAS_VERCEL, type OpcionesCambios, type OpcionesCapturar, type OpcionesDesplegar, type OpcionesIgnorar, type OpcionesMedir, type OpcionesProceso, PASOS_VERCEL, PREFIJO_PREVIEW, type PaginaDeployments, type PaginaTeams, type PaginacionVercel, type PedidoCaptura, type ProyectoVercelBuild, RAMA_PRINCIPAL, REFERENCIA_DEPLOYMENTS_V6, type RespuestaHttp, type Resultado, type ResultadoDeployments, type ResultadoProceso, type SolicitarVercel, USO, VARIABLES_VERCEL, armarCapturaV6, calcularMinutosPorDia, capturar, comandoCapturar, comandoDesplegar, comandoIgnorar, comandoMedir, comandoTurbo, configVacia, consultarDeployments, desplegar, ejecutar, ejecutarCapturar, ejecutarDesplegar, ejecutarIgnorar, ejecutarMedir, esquemaArchivoDeployments, esquemaCapturaV6, esquemaConfig, esquemaDeployment, esquemaEquipo, esquemaEstadoDeployment, esquemaPaginaDeployments, esquemaPaginaTeams, esquemaPaginacion, esquemaPedidoCaptura, evaluarCambios, ignorar, leerArgumentosCapturar, leerArgumentosDesplegar, leerArgumentosMedir, leerConfig, leerFlagsCli, leerRespuestaDeployments, medir, normalizarCarpeta, paquetesDeTurbo, pedirJsonVercel, principal, proyectoDeCarpeta, ramaPermitida, rangoFechasUtc, redactarToken, resolverEquipo, solicitarVercel, ubicarEnRepo, validarConfig, validarFechaIso };
|
|
1684
|
+
export { API_VERCEL_URL, ARCHIVO_CAPTURA_V6, ARCHIVO_CONFIG, ARCHIVO_DEPLOYMENTS_V6, ARCHIVO_ENV_PRODUCCION, type ArgumentosCapturar, type ArgumentosDesplegar, type ArgumentosMedir, COMANDOS, type CapturaV6, type Comando, type ConfigVercelBuild, type DeploymentPromocion, type DeploymentVercel, type DiaMinutos, type Dormir, ESTADOS_DEPLOYMENT, type Ejecutar, type Entorno, type EquipoVercel, ErrorContratoVercel, ErrorRedVercel, type Evaluacion, INTERVALO_POLL_DEPLOY_MS, LIMITE_PAGINA_VERCEL, MAX_PAGINAS_VERCEL, type MetodoHttpVercel, type OpcionesCambios, type OpcionesCapturar, type OpcionesDesplegar, type OpcionesIgnorar, type OpcionesMedir, type OpcionesProceso, type OpcionesPromover, PASOS_VERCEL, PASO_DEPLOY_REMOTO, PREFIJO_PREVIEW, type PaginaDeployments, type PaginaTeams, type PaginacionVercel, type PedidoCaptura, type ProyectoVercelBuild, RAMA_PRINCIPAL, REFERENCIA_DEPLOYMENTS_V6, type RespuestaHttp, type Resultado, type ResultadoDeployments, type ResultadoProceso, type ResultadoPromocion, type SolicitarVercel, TIMEOUT_POLL_DEPLOY_MS, USO, VARIABLES_VERCEL, armarCapturaV6, calcularMinutosPorDia, capturar, comandoCapturar, comandoDesplegar, comandoIgnorar, comandoMedir, comandoTurbo, configVacia, consultarDeployments, desplegar, dormirSincrono, ejecutar, ejecutarCapturar, ejecutarDesplegar, ejecutarIgnorar, ejecutarMedir, esperarYPromoverDeploy, esquemaArchivoDeployments, esquemaCapturaV6, esquemaConfig, esquemaDeployment, esquemaDeploymentPromocion, esquemaEquipo, esquemaEstadoDeployment, esquemaListaDeploymentsPromocion, esquemaPaginaDeployments, esquemaPaginaTeams, esquemaPaginacion, esquemaPedidoCaptura, evaluarCambios, extraerAliasProduccion, extraerIdOUrlDeploy, extraerUrlSalud, ignorar, leerArgumentosCapturar, leerArgumentosDesplegar, leerArgumentosMedir, leerConfig, leerFlagsCli, leerRespuestaDeployments, limpiarIdOUrlDeploy, medir, normalizarCarpeta, paquetesDeTurbo, pedirJsonVercel, principal, proyectoDeCarpeta, ramaPermitida, rangoFechasUtc, redactarToken, resolverEquipo, solicitarVercel, tieneVariablesSensibles, ubicarEnRepo, validarConfig, validarFechaIso };
|
package/dist/index.js
CHANGED
|
@@ -91,13 +91,13 @@ var esquemaArchivoDeployments = zod.z.object({
|
|
|
91
91
|
paginas: zod.z.array(esquemaPaginaDeployments).min(1)
|
|
92
92
|
}).passthrough();
|
|
93
93
|
var SCRIPT_FETCH = [
|
|
94
|
-
"const [u] = process.argv.slice(1), h = require('node:fs').readFileSync(0, 'utf8');",
|
|
95
|
-
"fetch(u, { method:
|
|
94
|
+
"const [u, m = 'GET'] = process.argv.slice(1), h = require('node:fs').readFileSync(0, 'utf8');",
|
|
95
|
+
"fetch(u, { method: m, headers: JSON.parse(h) })",
|
|
96
96
|
" .then(async (r) => process.stdout.write(JSON.stringify({ estado: r.status, cuerpo: await r.text() })))",
|
|
97
97
|
" .catch((e) => { process.stderr.write(String(e?.message || e)); process.exit(1); });"
|
|
98
98
|
].join("\n");
|
|
99
|
-
var solicitarVercel = (url, headers) => {
|
|
100
|
-
const r = child_process.spawnSync(process.execPath, ["-e", SCRIPT_FETCH, url], {
|
|
99
|
+
var solicitarVercel = (url, headers, metodo = "GET") => {
|
|
100
|
+
const r = child_process.spawnSync(process.execPath, ["-e", SCRIPT_FETCH, url, metodo], {
|
|
101
101
|
input: JSON.stringify(headers),
|
|
102
102
|
shell: false,
|
|
103
103
|
encoding: "utf8",
|
|
@@ -113,26 +113,22 @@ var solicitarVercel = (url, headers) => {
|
|
|
113
113
|
function pedirJsonVercel(rutaQuery, token, solicitar = solicitarVercel, baseUrl = API_VERCEL_URL) {
|
|
114
114
|
let respuesta;
|
|
115
115
|
try {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
});
|
|
116
|
+
const headers = { Authorization: `Bearer ${token}` };
|
|
117
|
+
respuesta = solicitar(`${baseUrl}${rutaQuery}`, headers);
|
|
119
118
|
} catch (e) {
|
|
120
119
|
if (e instanceof ErrorRedVercel || e instanceof ErrorContratoVercel)
|
|
121
120
|
throw e;
|
|
122
121
|
throw new ErrorRedVercel(e.message);
|
|
123
122
|
}
|
|
124
123
|
if (respuesta.estado < 200 || respuesta.estado >= 300) {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
respuesta.estado
|
|
128
|
-
);
|
|
124
|
+
const msg = `HTTP ${respuesta.estado} en GET ${rutaQuery}`;
|
|
125
|
+
throw new ErrorRedVercel(msg, respuesta.estado);
|
|
129
126
|
}
|
|
130
127
|
try {
|
|
131
128
|
return { estado: respuesta.estado, valor: JSON.parse(respuesta.cuerpo) };
|
|
132
129
|
} catch (e) {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
);
|
|
130
|
+
const msg = `JSON inv\xE1lido en GET ${rutaQuery}: ${e.message}`;
|
|
131
|
+
throw new ErrorContratoVercel(msg);
|
|
136
132
|
}
|
|
137
133
|
}
|
|
138
134
|
function resolverEquipo(equipo, token, solicitar = solicitarVercel, baseUrl = API_VERCEL_URL) {
|
|
@@ -233,12 +229,8 @@ function calcularMinutosPorDia(paginas, desde, hasta) {
|
|
|
233
229
|
};
|
|
234
230
|
}
|
|
235
231
|
function leerArgumentosMedir(args) {
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
"--desde",
|
|
239
|
-
"--hasta",
|
|
240
|
-
"--respuesta"
|
|
241
|
-
]);
|
|
232
|
+
const flags = ["--equipo", "--desde", "--hasta", "--respuesta"];
|
|
233
|
+
const f = leerFlagsCli(args, flags);
|
|
242
234
|
if (!f.ok) return f;
|
|
243
235
|
const { equipo, desde, hasta, respuesta } = f.valores;
|
|
244
236
|
if (!equipo) return { ok: false, motivo: "falta --equipo <slug|team_id>" };
|
|
@@ -585,12 +577,12 @@ function ejecutar(comando, args, opciones) {
|
|
|
585
577
|
maxBuffer: 64 * 1024 * 1024,
|
|
586
578
|
stdio: opciones.heredar ? "inherit" : "pipe"
|
|
587
579
|
});
|
|
588
|
-
const
|
|
580
|
+
const fallo2 = r.error?.message ?? (r.signal ? `termin\xF3 por la se\xF1al ${r.signal}` : void 0);
|
|
589
581
|
return {
|
|
590
582
|
codigo: r.status,
|
|
591
583
|
salida: r.stdout ?? "",
|
|
592
584
|
error: r.stderr ?? "",
|
|
593
|
-
...
|
|
585
|
+
...fallo2 ? { fallo: fallo2 } : {}
|
|
594
586
|
};
|
|
595
587
|
}
|
|
596
588
|
var incierto = (motivo) => ({
|
|
@@ -710,6 +702,265 @@ function evaluarCambios(opciones) {
|
|
|
710
702
|
motivo: `turbo: ${nombre} sin paquetes afectados`
|
|
711
703
|
};
|
|
712
704
|
}
|
|
705
|
+
var INTERVALO_POLL_DEPLOY_MS = 5e3;
|
|
706
|
+
var TIMEOUT_POLL_DEPLOY_MS = 6e5;
|
|
707
|
+
var REGEX_ANSI = new RegExp(
|
|
708
|
+
`${String.fromCharCode(27)}\\[[0-9;]*[a-zA-Z]`,
|
|
709
|
+
"g"
|
|
710
|
+
);
|
|
711
|
+
var dormirSincrono = (ms) => {
|
|
712
|
+
if (ms > 0) Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
713
|
+
};
|
|
714
|
+
var esquemaDeploymentPromocion = zod.z.object({
|
|
715
|
+
id: zod.z.string().min(1).optional(),
|
|
716
|
+
uid: zod.z.string().min(1).optional(),
|
|
717
|
+
projectId: zod.z.string().min(1).optional(),
|
|
718
|
+
target: zod.z.string().nullable().optional(),
|
|
719
|
+
state: esquemaEstadoDeployment.optional(),
|
|
720
|
+
readyState: esquemaEstadoDeployment.optional(),
|
|
721
|
+
readySubstate: zod.z.string().min(1).optional(),
|
|
722
|
+
url: zod.z.string().min(1).optional(),
|
|
723
|
+
alias: zod.z.union([zod.z.array(zod.z.string()), zod.z.string()]).optional(),
|
|
724
|
+
aliases: zod.z.array(zod.z.string()).optional(),
|
|
725
|
+
meta: zod.z.record(zod.z.unknown()).optional()
|
|
726
|
+
}).passthrough().refine((d) => d.id !== void 0 || d.uid !== void 0, {
|
|
727
|
+
message: "el deployment debe incluir id o uid"
|
|
728
|
+
}).refine((d) => d.state !== void 0 || d.readyState !== void 0, {
|
|
729
|
+
message: "el deployment debe incluir state o readyState"
|
|
730
|
+
});
|
|
731
|
+
var esquemaListaDeploymentsPromocion = zod.z.object({ deployments: zod.z.array(esquemaDeploymentPromocion) }).passthrough();
|
|
732
|
+
function limpiarIdOUrlDeploy(valor) {
|
|
733
|
+
const sinAnsi = valor.replace(REGEX_ANSI, "").trim();
|
|
734
|
+
const limpio = sinAnsi.replace(/^https?:\/\//i, "").replace(/[/?#].*$/, "").replace(/[.,;]+$/, "").trim();
|
|
735
|
+
return limpio || null;
|
|
736
|
+
}
|
|
737
|
+
function extraerIdOUrlDeploy(salida, error = "") {
|
|
738
|
+
const stdout = salida.replace(REGEX_ANSI, "");
|
|
739
|
+
const texto = `${error}
|
|
740
|
+
${salida}`.replace(REGEX_ANSI, "");
|
|
741
|
+
const urlStdout = /^\s*(https?:\/\/[^\s\]"')>]+)/im.exec(stdout)?.[1];
|
|
742
|
+
const produccion = /\bProduction\s*:\s*(https?:\/\/[^\s\]"')>]+)/i.exec(
|
|
743
|
+
texto
|
|
744
|
+
)?.[1];
|
|
745
|
+
const alias = /\bAlias(?:ed)?\s*:\s*(https?:\/\/[^\s\]"')>]+)/i.exec(
|
|
746
|
+
texto
|
|
747
|
+
)?.[1];
|
|
748
|
+
const candidata = urlStdout ?? produccion ?? alias;
|
|
749
|
+
if (candidata) {
|
|
750
|
+
const limpio = limpiarIdOUrlDeploy(candidata);
|
|
751
|
+
if (limpio && limpio !== "vercel.com") return limpio;
|
|
752
|
+
}
|
|
753
|
+
return /\b(dpl_[a-zA-Z0-9]+)\b/.exec(texto)?.[1] ?? null;
|
|
754
|
+
}
|
|
755
|
+
function normalizarUrlHttps(dominioOUrl) {
|
|
756
|
+
const limpio = dominioOUrl.trim().replace(/[.,;]+$/, "").replace(/\/+$/, "");
|
|
757
|
+
return /^https?:\/\//i.test(limpio) ? limpio : `https://${limpio}`;
|
|
758
|
+
}
|
|
759
|
+
function esDominioVercelApp(dominioOUrl) {
|
|
760
|
+
const host = dominioOUrl.trim().replace(/^https?:\/\//i, "").split("/")[0]?.toLowerCase() ?? "";
|
|
761
|
+
return host === "vercel.app" || host.endsWith(".vercel.app");
|
|
762
|
+
}
|
|
763
|
+
function extraerAliasProduccion(deployment) {
|
|
764
|
+
const crudos = [];
|
|
765
|
+
if (Array.isArray(deployment.alias)) crudos.push(...deployment.alias);
|
|
766
|
+
else if (typeof deployment.alias === "string") crudos.push(deployment.alias);
|
|
767
|
+
if (Array.isArray(deployment.aliases)) crudos.push(...deployment.aliases);
|
|
768
|
+
const candidatos = crudos.map((c) => c.trim()).filter(Boolean);
|
|
769
|
+
if (candidatos.length === 0) {
|
|
770
|
+
return deployment.url && !esDominioVercelApp(deployment.url) ? normalizarUrlHttps(deployment.url) : null;
|
|
771
|
+
}
|
|
772
|
+
const dominioPropio = candidatos.find((c) => !esDominioVercelApp(c));
|
|
773
|
+
return normalizarUrlHttps(dominioPropio ?? candidatos[0]);
|
|
774
|
+
}
|
|
775
|
+
function obtenerShaCommit(opc, ej) {
|
|
776
|
+
const explicito = opc.sha?.trim() || opc.env?.VERCEL_GIT_COMMIT_SHA?.trim();
|
|
777
|
+
if (explicito) return explicito;
|
|
778
|
+
const dirs = [opc.carpeta, opc.cwd].filter((d) => Boolean(d));
|
|
779
|
+
for (const dir of dirs) {
|
|
780
|
+
const raiz = ubicarEnRepo(dir, ej)?.raiz ?? dir;
|
|
781
|
+
const r = ej("git", ["rev-parse", "HEAD"], {
|
|
782
|
+
cwd: raiz,
|
|
783
|
+
...opc.env ? { env: opc.env } : {}
|
|
784
|
+
});
|
|
785
|
+
if (r.codigo === 0 && r.salida.trim() !== "") return r.salida.trim();
|
|
786
|
+
}
|
|
787
|
+
return null;
|
|
788
|
+
}
|
|
789
|
+
var err = (motivo) => ({ ok: false, motivo });
|
|
790
|
+
var fallo = (motivo) => ({
|
|
791
|
+
ok: false,
|
|
792
|
+
codigo: 1,
|
|
793
|
+
motivo
|
|
794
|
+
});
|
|
795
|
+
function llamarApiVercel(rutaQuery, ctx, metodo = "GET") {
|
|
796
|
+
let respuesta;
|
|
797
|
+
try {
|
|
798
|
+
const auth = { Authorization: `Bearer ${ctx.token}` };
|
|
799
|
+
respuesta = ctx.solicitar(`${ctx.baseUrl}${rutaQuery}`, auth, metodo);
|
|
800
|
+
} catch (e) {
|
|
801
|
+
const msg = e instanceof Error ? e.message : String(e);
|
|
802
|
+
return err(`fallo de red en ${metodo} ${rutaQuery} (${msg})`);
|
|
803
|
+
}
|
|
804
|
+
if (respuesta.estado < 200 || respuesta.estado >= 300) {
|
|
805
|
+
return err(`HTTP ${respuesta.estado} en ${metodo} ${rutaQuery}`);
|
|
806
|
+
}
|
|
807
|
+
return { ok: true, cuerpo: respuesta.cuerpo };
|
|
808
|
+
}
|
|
809
|
+
function validarIdentidadDeployment(d, ctx) {
|
|
810
|
+
const deploymentId = d.id ?? d.uid;
|
|
811
|
+
if (d.projectId !== void 0 && d.projectId !== ctx.projectId) {
|
|
812
|
+
return err(
|
|
813
|
+
`el deploy ${deploymentId} pertenece al proyecto ${d.projectId} y no a ${ctx.projectId}`
|
|
814
|
+
);
|
|
815
|
+
}
|
|
816
|
+
if (d.target !== void 0 && d.target !== null && d.target !== "production") {
|
|
817
|
+
return err(
|
|
818
|
+
`el deploy ${deploymentId} no es de producci\xF3n (target=${d.target})`
|
|
819
|
+
);
|
|
820
|
+
}
|
|
821
|
+
const shaMeta = typeof d.meta?.githubCommitSha === "string" ? d.meta.githubCommitSha.trim() : typeof d.meta?.gitCommitSha === "string" ? d.meta.gitCommitSha.trim() : "";
|
|
822
|
+
if (!shaMeta || shaMeta !== ctx.sha) {
|
|
823
|
+
return err(
|
|
824
|
+
`el deploy ${deploymentId} corresponde al SHA ${shaMeta || "desconocido"} y no a ${ctx.sha}`
|
|
825
|
+
);
|
|
826
|
+
}
|
|
827
|
+
return { ok: true, deploymentId };
|
|
828
|
+
}
|
|
829
|
+
function consultarDeploymentV13(idOrUrl, ctx) {
|
|
830
|
+
const ruta = `/v13/deployments/${encodeURIComponent(idOrUrl)}?${ctx.qTeam}`;
|
|
831
|
+
const resp = llamarApiVercel(ruta, ctx, "GET");
|
|
832
|
+
if (!resp.ok) return resp;
|
|
833
|
+
let json;
|
|
834
|
+
try {
|
|
835
|
+
json = JSON.parse(resp.cuerpo);
|
|
836
|
+
} catch (e) {
|
|
837
|
+
return err(`JSON inv\xE1lido en GET ${ruta} (${e.message})`);
|
|
838
|
+
}
|
|
839
|
+
const r = esquemaDeploymentPromocion.safeParse(json);
|
|
840
|
+
if (!r.success) {
|
|
841
|
+
return err(`respuesta inv\xE1lida en GET ${ruta} (${r.error.message})`);
|
|
842
|
+
}
|
|
843
|
+
const val = validarIdentidadDeployment(r.data, ctx);
|
|
844
|
+
if (!val.ok) return val;
|
|
845
|
+
return { ok: true, valor: r.data, deploymentId: val.deploymentId };
|
|
846
|
+
}
|
|
847
|
+
function esperarYPromoverDeploy(opciones) {
|
|
848
|
+
const ej = opciones.ejecutar ?? ejecutar;
|
|
849
|
+
const solicitar = opciones.solicitar ?? solicitarVercel;
|
|
850
|
+
const dormir = opciones.dormir ?? dormirSincrono;
|
|
851
|
+
const intervaloMs = opciones.intervaloMs ?? INTERVALO_POLL_DEPLOY_MS;
|
|
852
|
+
const timeoutMs = opciones.timeoutMs ?? TIMEOUT_POLL_DEPLOY_MS;
|
|
853
|
+
const maxIntentos = opciones.maxIntentos;
|
|
854
|
+
const token = opciones.token?.trim() || opciones.env?.VERCEL_TOKEN?.trim() || "";
|
|
855
|
+
const teamId = opciones.teamId?.trim() || opciones.env?.VERCEL_ORG_ID?.trim() || "";
|
|
856
|
+
const projectId = opciones.projectId?.trim() || opciones.env?.VERCEL_PROJECT_ID?.trim() || "";
|
|
857
|
+
const baseUrl = (opciones.baseUrl ?? opciones.env?.VERCEL_API_URL)?.trim() || API_VERCEL_URL;
|
|
858
|
+
if (!token || !teamId || !projectId) {
|
|
859
|
+
return fallo("faltan credenciales de Vercel para promover el deploy");
|
|
860
|
+
}
|
|
861
|
+
const sha = obtenerShaCommit(opciones, ej);
|
|
862
|
+
if (!sha) {
|
|
863
|
+
return fallo(
|
|
864
|
+
"no se pudo determinar el SHA actual para verificar el deploy"
|
|
865
|
+
);
|
|
866
|
+
}
|
|
867
|
+
const ctx = {
|
|
868
|
+
qTeam: `teamId=${encodeURIComponent(teamId)}`,
|
|
869
|
+
projectId,
|
|
870
|
+
sha,
|
|
871
|
+
token,
|
|
872
|
+
solicitar,
|
|
873
|
+
baseUrl
|
|
874
|
+
};
|
|
875
|
+
let idOrUrl = opciones.urlDeploy !== void 0 && opciones.urlDeploy !== null ? limpiarIdOUrlDeploy(opciones.urlDeploy) : extraerIdOUrlDeploy(
|
|
876
|
+
opciones.salidaDeploy ?? "",
|
|
877
|
+
opciones.errorDeploy ?? ""
|
|
878
|
+
);
|
|
879
|
+
let transcurridoMs = 0;
|
|
880
|
+
let intentos = 0;
|
|
881
|
+
let deployListo = null;
|
|
882
|
+
let deploymentId = "";
|
|
883
|
+
while (deployListo === null) {
|
|
884
|
+
intentos++;
|
|
885
|
+
let actual;
|
|
886
|
+
if (idOrUrl) {
|
|
887
|
+
const c = consultarDeploymentV13(idOrUrl, ctx);
|
|
888
|
+
if (!c.ok) return fallo(c.motivo);
|
|
889
|
+
actual = c.valor;
|
|
890
|
+
deploymentId = c.deploymentId;
|
|
891
|
+
} else {
|
|
892
|
+
const q = `${ctx.qTeam}&projectId=${encodeURIComponent(projectId)}&target=production&sha=${encodeURIComponent(sha)}`;
|
|
893
|
+
const ruta = `/v6/deployments?${q}`;
|
|
894
|
+
const resp = llamarApiVercel(ruta, ctx, "GET");
|
|
895
|
+
if (!resp.ok) return fallo(resp.motivo);
|
|
896
|
+
let json;
|
|
897
|
+
try {
|
|
898
|
+
json = JSON.parse(resp.cuerpo);
|
|
899
|
+
} catch (e) {
|
|
900
|
+
return fallo(`JSON inv\xE1lido en GET ${ruta} (${e.message})`);
|
|
901
|
+
}
|
|
902
|
+
const lista = esquemaListaDeploymentsPromocion.safeParse(json);
|
|
903
|
+
if (!lista.success || lista.data.deployments.length === 0) {
|
|
904
|
+
return fallo(
|
|
905
|
+
`no se encontr\xF3 deployment de producci\xF3n para el SHA ${sha}`
|
|
906
|
+
);
|
|
907
|
+
}
|
|
908
|
+
actual = lista.data.deployments[0];
|
|
909
|
+
const val = validarIdentidadDeployment(actual, ctx);
|
|
910
|
+
if (!val.ok) return fallo(val.motivo);
|
|
911
|
+
deploymentId = val.deploymentId;
|
|
912
|
+
idOrUrl = deploymentId;
|
|
913
|
+
}
|
|
914
|
+
const estado = actual.readyState ?? actual.state;
|
|
915
|
+
if (estado === "ERROR" || estado === "CANCELED") {
|
|
916
|
+
return fallo(`el deploy ${deploymentId} termin\xF3 en estado ${estado}`);
|
|
917
|
+
}
|
|
918
|
+
if (estado === "READY") {
|
|
919
|
+
deployListo = actual;
|
|
920
|
+
break;
|
|
921
|
+
}
|
|
922
|
+
if (maxIntentos !== void 0 && intentos >= maxIntentos || transcurridoMs + intervaloMs > timeoutMs) {
|
|
923
|
+
return fallo(
|
|
924
|
+
`timeout esperando a que el deploy ${deploymentId} llegue a READY (estado: ${estado})`
|
|
925
|
+
);
|
|
926
|
+
}
|
|
927
|
+
dormir(intervaloMs);
|
|
928
|
+
transcurridoMs += intervaloMs;
|
|
929
|
+
}
|
|
930
|
+
let deployFinal = deployListo;
|
|
931
|
+
if (deployListo.readySubstate !== "PROMOTED") {
|
|
932
|
+
const rutaPromote = `/v10/projects/${encodeURIComponent(projectId)}/promote/${encodeURIComponent(deploymentId)}?${ctx.qTeam}`;
|
|
933
|
+
const respPromote = llamarApiVercel(rutaPromote, ctx, "POST");
|
|
934
|
+
if (!respPromote.ok) return fallo(respPromote.motivo);
|
|
935
|
+
for (; ; ) {
|
|
936
|
+
intentos++;
|
|
937
|
+
const c = consultarDeploymentV13(deploymentId, ctx);
|
|
938
|
+
if (!c.ok) return fallo(c.motivo);
|
|
939
|
+
const dConf = c.valor;
|
|
940
|
+
const estadoConf = dConf.readyState ?? dConf.state;
|
|
941
|
+
if (estadoConf === "ERROR" || estadoConf === "CANCELED") {
|
|
942
|
+
return fallo(
|
|
943
|
+
`el deploy ${deploymentId} termin\xF3 en estado ${estadoConf} durante la promoci\xF3n`
|
|
944
|
+
);
|
|
945
|
+
}
|
|
946
|
+
if (estadoConf === "READY" && dConf.readySubstate === "PROMOTED") {
|
|
947
|
+
deployFinal = dConf;
|
|
948
|
+
break;
|
|
949
|
+
}
|
|
950
|
+
if (maxIntentos !== void 0 && intentos >= maxIntentos || transcurridoMs + intervaloMs > timeoutMs) {
|
|
951
|
+
return fallo(
|
|
952
|
+
`timeout esperando que el deploy ${deploymentId} quede PROMOTED (subestado: ${dConf.readySubstate ?? "sin subestado"})`
|
|
953
|
+
);
|
|
954
|
+
}
|
|
955
|
+
dormir(intervaloMs);
|
|
956
|
+
transcurridoMs += intervaloMs;
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
const alias = extraerAliasProduccion(deployFinal) ?? extraerAliasProduccion(deployListo);
|
|
960
|
+
const urlRaw = deployFinal.url ?? deployListo.url;
|
|
961
|
+
const url = urlRaw ? normalizarUrlHttps(urlRaw) : null;
|
|
962
|
+
return { ok: true, codigo: 0, deploymentId, alias, url };
|
|
963
|
+
}
|
|
713
964
|
|
|
714
965
|
// src/comandos/desplegar.ts
|
|
715
966
|
var VARIABLES_VERCEL = [
|
|
@@ -722,9 +973,25 @@ var PASOS_VERCEL = [
|
|
|
722
973
|
["build", "--prod"],
|
|
723
974
|
["deploy", "--prebuilt", "--prod"]
|
|
724
975
|
];
|
|
976
|
+
var PASO_DEPLOY_REMOTO = [
|
|
977
|
+
"deploy",
|
|
978
|
+
"--prod",
|
|
979
|
+
"--yes",
|
|
980
|
+
"--no-wait"
|
|
981
|
+
];
|
|
982
|
+
var ARCHIVO_ENV_PRODUCCION = path3__namespace.join(
|
|
983
|
+
".vercel",
|
|
984
|
+
".env.production.local"
|
|
985
|
+
);
|
|
986
|
+
var MARCADOR_SENSITIVE = "[SENSITIVE]";
|
|
987
|
+
var REGEX_ANSI2 = new RegExp(
|
|
988
|
+
`${String.fromCharCode(27)}\\[[0-9;]*[a-zA-Z]`,
|
|
989
|
+
"g"
|
|
990
|
+
);
|
|
725
991
|
function leerArgumentosDesplegar(args) {
|
|
726
992
|
let carpeta;
|
|
727
993
|
let antes;
|
|
994
|
+
let urlSalud;
|
|
728
995
|
for (let i = 0; i < args.length; i++) {
|
|
729
996
|
const arg = args[i] ?? "";
|
|
730
997
|
if (arg === "--carpeta" || arg.startsWith("--carpeta=")) {
|
|
@@ -743,6 +1010,14 @@ function leerArgumentosDesplegar(args) {
|
|
|
743
1010
|
antes = valor.trim();
|
|
744
1011
|
continue;
|
|
745
1012
|
}
|
|
1013
|
+
if (arg === "--url-salud" || arg.startsWith("--url-salud=")) {
|
|
1014
|
+
const valor = arg === "--url-salud" ? args[++i] : arg.slice("--url-salud=".length);
|
|
1015
|
+
if (!valor || valor.trim() === "" || valor.startsWith("-")) {
|
|
1016
|
+
return { ok: false, motivo: "falta el valor de --url-salud <url>" };
|
|
1017
|
+
}
|
|
1018
|
+
urlSalud = valor.trim();
|
|
1019
|
+
continue;
|
|
1020
|
+
}
|
|
746
1021
|
return { ok: false, motivo: `argumento no reconocido: ${arg}` };
|
|
747
1022
|
}
|
|
748
1023
|
if (!carpeta) {
|
|
@@ -753,9 +1028,30 @@ function leerArgumentosDesplegar(args) {
|
|
|
753
1028
|
}
|
|
754
1029
|
return {
|
|
755
1030
|
ok: true,
|
|
756
|
-
valor: {
|
|
1031
|
+
valor: {
|
|
1032
|
+
carpeta,
|
|
1033
|
+
...antes !== void 0 ? { antes } : {},
|
|
1034
|
+
...urlSalud !== void 0 ? { urlSalud } : {}
|
|
1035
|
+
}
|
|
757
1036
|
};
|
|
758
1037
|
}
|
|
1038
|
+
function tieneVariablesSensibles(carpeta) {
|
|
1039
|
+
const archivo = path3__namespace.join(carpeta, ARCHIVO_ENV_PRODUCCION);
|
|
1040
|
+
return fs.existsSync(archivo) && fs.statSync(archivo).isFile() && fs.readFileSync(archivo, "utf8").includes(MARCADOR_SENSITIVE);
|
|
1041
|
+
}
|
|
1042
|
+
function extraerUrlSalud(salida, error = "") {
|
|
1043
|
+
const stdout = salida.replace(REGEX_ANSI2, "");
|
|
1044
|
+
const texto = `${error}
|
|
1045
|
+
${salida}`.replace(REGEX_ANSI2, "");
|
|
1046
|
+
const alias = /\bAlias(?:ed)?\s*:\s*(https?:\/\/[^\s\]"')>]+)/i.exec(
|
|
1047
|
+
texto
|
|
1048
|
+
)?.[1];
|
|
1049
|
+
const urlStdout = /^\s*(https?:\/\/[^\s\]"')>]+)/im.exec(stdout)?.[1];
|
|
1050
|
+
const produccion = /\bProduction\s*:\s*(https?:\/\/[^\s\]"')>]+)/i.exec(
|
|
1051
|
+
texto
|
|
1052
|
+
)?.[1];
|
|
1053
|
+
return (alias ?? urlStdout ?? produccion)?.replace(/[.,;]+$/, "") ?? null;
|
|
1054
|
+
}
|
|
759
1055
|
function redactarCredenciales(texto, env) {
|
|
760
1056
|
let limpio = texto;
|
|
761
1057
|
for (const nombre of VARIABLES_VERCEL) {
|
|
@@ -766,9 +1062,30 @@ function redactarCredenciales(texto, env) {
|
|
|
766
1062
|
}
|
|
767
1063
|
return limpio;
|
|
768
1064
|
}
|
|
1065
|
+
function correrPasoVercel(ej, paso, cwd, opciones) {
|
|
1066
|
+
const r = ej("vercel", paso, { cwd, env: opciones.env });
|
|
1067
|
+
if (r.salida.trim() !== "") {
|
|
1068
|
+
opciones.salida(redactarCredenciales(r.salida.trimEnd(), opciones.env));
|
|
1069
|
+
}
|
|
1070
|
+
if (r.error.trim() !== "") {
|
|
1071
|
+
opciones.error(redactarCredenciales(r.error.trimEnd(), opciones.env));
|
|
1072
|
+
}
|
|
1073
|
+
if (r.codigo !== 0) {
|
|
1074
|
+
const codigo = r.codigo ?? 127;
|
|
1075
|
+
opciones.error(
|
|
1076
|
+
redactarCredenciales(
|
|
1077
|
+
`wallavi-vercel desplegar: vercel ${paso.join(" ")} fall\xF3 (${r.fallo ?? `c\xF3digo ${codigo}`})`,
|
|
1078
|
+
opciones.env
|
|
1079
|
+
)
|
|
1080
|
+
);
|
|
1081
|
+
return { ok: false, codigo };
|
|
1082
|
+
}
|
|
1083
|
+
return { ok: true, resultado: r };
|
|
1084
|
+
}
|
|
769
1085
|
function ejecutarDesplegar(opciones) {
|
|
770
1086
|
const ej = opciones.ejecutar ?? ejecutar;
|
|
771
1087
|
const evaluar = opciones.evaluar ?? evaluarCambios;
|
|
1088
|
+
const solicitar = opciones.solicitar ?? solicitarVercel;
|
|
772
1089
|
const rutaCarpeta = path3__namespace.resolve(opciones.cwd, opciones.carpeta);
|
|
773
1090
|
if (!fs.existsSync(rutaCarpeta) || !fs.statSync(rutaCarpeta).isDirectory()) {
|
|
774
1091
|
opciones.error(
|
|
@@ -795,27 +1112,93 @@ function ejecutarDesplegar(opciones) {
|
|
|
795
1112
|
);
|
|
796
1113
|
return 0;
|
|
797
1114
|
}
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
1115
|
+
const rPull = correrPasoVercel(ej, PASOS_VERCEL[0], rutaCarpeta, opciones);
|
|
1116
|
+
if (!rPull.ok) return rPull.codigo;
|
|
1117
|
+
const cwdResuelto = path3__namespace.resolve(opciones.cwd);
|
|
1118
|
+
const raizGit = ubicarEnRepo(rutaCarpeta, ej)?.raiz ?? ubicarEnRepo(cwdResuelto, ej)?.raiz;
|
|
1119
|
+
const carpetasEnv = [
|
|
1120
|
+
...new Set(
|
|
1121
|
+
[rutaCarpeta, cwdResuelto, raizGit].filter(
|
|
1122
|
+
(c) => Boolean(c)
|
|
1123
|
+
)
|
|
1124
|
+
)
|
|
1125
|
+
];
|
|
1126
|
+
const carpetasSensibles = carpetasEnv.filter(tieneVariablesSensibles);
|
|
1127
|
+
const haySensibles = carpetasSensibles.length > 0;
|
|
1128
|
+
if (haySensibles) {
|
|
1129
|
+
for (const dir of carpetasSensibles) {
|
|
1130
|
+
fs.rmSync(path3__namespace.join(dir, ARCHIVO_ENV_PRODUCCION), { force: true });
|
|
805
1131
|
}
|
|
806
|
-
|
|
807
|
-
|
|
1132
|
+
opciones.salida(
|
|
1133
|
+
"wallavi-vercel desplegar: .vercel/.env.production.local contiene [SENSITIVE]; se omite --prebuilt y se delega a vercel deploy --prod --yes --no-wait"
|
|
1134
|
+
);
|
|
1135
|
+
}
|
|
1136
|
+
const pasosRestantes = haySensibles ? [PASO_DEPLOY_REMOTO] : PASOS_VERCEL.slice(1);
|
|
1137
|
+
let ultimoDeploy = rPull.resultado;
|
|
1138
|
+
for (const paso of pasosRestantes) {
|
|
1139
|
+
const r = correrPasoVercel(ej, paso, rutaCarpeta, opciones);
|
|
1140
|
+
if (!r.ok) return r.codigo;
|
|
1141
|
+
ultimoDeploy = r.resultado;
|
|
1142
|
+
}
|
|
1143
|
+
let aliasPromovido = null;
|
|
1144
|
+
let urlDeployPromovido = null;
|
|
1145
|
+
if (haySensibles) {
|
|
1146
|
+
const promocion = esperarYPromoverDeploy({
|
|
1147
|
+
cwd: opciones.cwd,
|
|
1148
|
+
carpeta: rutaCarpeta,
|
|
1149
|
+
env: opciones.env,
|
|
1150
|
+
salidaDeploy: ultimoDeploy.salida,
|
|
1151
|
+
errorDeploy: ultimoDeploy.error,
|
|
1152
|
+
ejecutar: ej,
|
|
1153
|
+
solicitar,
|
|
1154
|
+
...opciones.dormir !== void 0 ? { dormir: opciones.dormir } : {},
|
|
1155
|
+
...opciones.intervaloPollMs !== void 0 ? { intervaloMs: opciones.intervaloPollMs } : {},
|
|
1156
|
+
...opciones.timeoutPollMs !== void 0 ? { timeoutMs: opciones.timeoutPollMs } : {},
|
|
1157
|
+
...opciones.maxIntentosPoll !== void 0 ? { maxIntentos: opciones.maxIntentosPoll } : {},
|
|
1158
|
+
...opciones.baseUrl !== void 0 ? { baseUrl: opciones.baseUrl } : {}
|
|
1159
|
+
});
|
|
1160
|
+
if (!promocion.ok) {
|
|
1161
|
+
opciones.error(
|
|
1162
|
+
redactarCredenciales(
|
|
1163
|
+
`wallavi-vercel desplegar: ${promocion.motivo}`,
|
|
1164
|
+
opciones.env
|
|
1165
|
+
)
|
|
1166
|
+
);
|
|
1167
|
+
return promocion.codigo;
|
|
808
1168
|
}
|
|
809
|
-
|
|
810
|
-
|
|
1169
|
+
aliasPromovido = promocion.alias;
|
|
1170
|
+
urlDeployPromovido = promocion.url;
|
|
1171
|
+
}
|
|
1172
|
+
const urlSalud = opciones.urlSalud?.trim() || opciones.env.VERCEL_HEALTHCHECK_URL?.trim() || aliasPromovido || extraerUrlSalud(ultimoDeploy.salida, ultimoDeploy.error) || urlDeployPromovido;
|
|
1173
|
+
if (!urlSalud) {
|
|
1174
|
+
opciones.error(
|
|
1175
|
+
redactarCredenciales(
|
|
1176
|
+
"wallavi-vercel desplegar: healthcheck HTTP fall\xF3 (no se obtuvo URL del deploy)",
|
|
1177
|
+
opciones.env
|
|
1178
|
+
)
|
|
1179
|
+
);
|
|
1180
|
+
return 1;
|
|
1181
|
+
}
|
|
1182
|
+
try {
|
|
1183
|
+
const respuesta = solicitar(urlSalud, {});
|
|
1184
|
+
if (respuesta.estado >= 500 || respuesta.cuerpo.includes("MIDDLEWARE_INVOCATION_FAILED")) {
|
|
1185
|
+
const detalle = respuesta.cuerpo.includes("MIDDLEWARE_INVOCATION_FAILED") ? `HTTP ${respuesta.estado} MIDDLEWARE_INVOCATION_FAILED` : `HTTP ${respuesta.estado}`;
|
|
811
1186
|
opciones.error(
|
|
812
1187
|
redactarCredenciales(
|
|
813
|
-
`wallavi-vercel desplegar:
|
|
1188
|
+
`wallavi-vercel desplegar: healthcheck HTTP fall\xF3 en ${urlSalud} (${detalle})`,
|
|
814
1189
|
opciones.env
|
|
815
1190
|
)
|
|
816
1191
|
);
|
|
817
|
-
return
|
|
1192
|
+
return 1;
|
|
818
1193
|
}
|
|
1194
|
+
} catch (e) {
|
|
1195
|
+
opciones.error(
|
|
1196
|
+
redactarCredenciales(
|
|
1197
|
+
`wallavi-vercel desplegar: healthcheck HTTP fall\xF3 en ${urlSalud} (${e instanceof Error ? e.message : String(e)})`,
|
|
1198
|
+
opciones.env
|
|
1199
|
+
)
|
|
1200
|
+
);
|
|
1201
|
+
return 1;
|
|
819
1202
|
}
|
|
820
1203
|
opciones.salida(
|
|
821
1204
|
`wallavi-vercel desplegar: desplegado (${evaluacion.motivo})`
|
|
@@ -831,7 +1214,8 @@ function comandoDesplegar(args, entorno) {
|
|
|
831
1214
|
return ejecutarDesplegar({
|
|
832
1215
|
...entorno,
|
|
833
1216
|
carpeta: leido.valor.carpeta,
|
|
834
|
-
...leido.valor.antes !== void 0 ? { antes: leido.valor.antes } : {}
|
|
1217
|
+
...leido.valor.antes !== void 0 ? { antes: leido.valor.antes } : {},
|
|
1218
|
+
...leido.valor.urlSalud !== void 0 ? { urlSalud: leido.valor.urlSalud } : {}
|
|
835
1219
|
});
|
|
836
1220
|
}
|
|
837
1221
|
var desplegar = comandoDesplegar;
|
|
@@ -905,7 +1289,7 @@ var USO = `Uso: wallavi-vercel <comando> [opciones]
|
|
|
905
1289
|
|
|
906
1290
|
Comandos:
|
|
907
1291
|
ignorar decide si Vercel debe omitir el build
|
|
908
|
-
desplegar --carpeta <ruta> [--antes <sha>]
|
|
1292
|
+
desplegar --carpeta <ruta> [--antes <sha>] [--url-salud <url>] compila, despliega y verifica la salud HTTP
|
|
909
1293
|
medir --equipo <slug|team_id> --desde <AAAA-MM-DD> --hasta <AAAA-MM-DD> [...] calcula los minutos de build por d\xEDa en UTC
|
|
910
1294
|
capturar --equipo <slug|team_id> --desde <AAAA-MM-DD> --hasta <AAAA-MM-DD> ... descarga deployments de Vercel y escribe su captura
|
|
911
1295
|
|
|
@@ -949,16 +1333,20 @@ exports.API_VERCEL_URL = API_VERCEL_URL;
|
|
|
949
1333
|
exports.ARCHIVO_CAPTURA_V6 = ARCHIVO_CAPTURA_V6;
|
|
950
1334
|
exports.ARCHIVO_CONFIG = ARCHIVO_CONFIG;
|
|
951
1335
|
exports.ARCHIVO_DEPLOYMENTS_V6 = ARCHIVO_DEPLOYMENTS_V6;
|
|
1336
|
+
exports.ARCHIVO_ENV_PRODUCCION = ARCHIVO_ENV_PRODUCCION;
|
|
952
1337
|
exports.COMANDOS = COMANDOS;
|
|
953
1338
|
exports.ESTADOS_DEPLOYMENT = ESTADOS_DEPLOYMENT;
|
|
954
1339
|
exports.ErrorContratoVercel = ErrorContratoVercel;
|
|
955
1340
|
exports.ErrorRedVercel = ErrorRedVercel;
|
|
1341
|
+
exports.INTERVALO_POLL_DEPLOY_MS = INTERVALO_POLL_DEPLOY_MS;
|
|
956
1342
|
exports.LIMITE_PAGINA_VERCEL = LIMITE_PAGINA_VERCEL;
|
|
957
1343
|
exports.MAX_PAGINAS_VERCEL = MAX_PAGINAS_VERCEL;
|
|
958
1344
|
exports.PASOS_VERCEL = PASOS_VERCEL;
|
|
1345
|
+
exports.PASO_DEPLOY_REMOTO = PASO_DEPLOY_REMOTO;
|
|
959
1346
|
exports.PREFIJO_PREVIEW = PREFIJO_PREVIEW;
|
|
960
1347
|
exports.RAMA_PRINCIPAL = RAMA_PRINCIPAL;
|
|
961
1348
|
exports.REFERENCIA_DEPLOYMENTS_V6 = REFERENCIA_DEPLOYMENTS_V6;
|
|
1349
|
+
exports.TIMEOUT_POLL_DEPLOY_MS = TIMEOUT_POLL_DEPLOY_MS;
|
|
962
1350
|
exports.USO = USO;
|
|
963
1351
|
exports.VARIABLES_VERCEL = VARIABLES_VERCEL;
|
|
964
1352
|
exports.armarCapturaV6 = armarCapturaV6;
|
|
@@ -972,22 +1360,29 @@ exports.comandoTurbo = comandoTurbo;
|
|
|
972
1360
|
exports.configVacia = configVacia;
|
|
973
1361
|
exports.consultarDeployments = consultarDeployments;
|
|
974
1362
|
exports.desplegar = desplegar;
|
|
1363
|
+
exports.dormirSincrono = dormirSincrono;
|
|
975
1364
|
exports.ejecutar = ejecutar;
|
|
976
1365
|
exports.ejecutarCapturar = ejecutarCapturar;
|
|
977
1366
|
exports.ejecutarDesplegar = ejecutarDesplegar;
|
|
978
1367
|
exports.ejecutarIgnorar = ejecutarIgnorar;
|
|
979
1368
|
exports.ejecutarMedir = ejecutarMedir;
|
|
1369
|
+
exports.esperarYPromoverDeploy = esperarYPromoverDeploy;
|
|
980
1370
|
exports.esquemaArchivoDeployments = esquemaArchivoDeployments;
|
|
981
1371
|
exports.esquemaCapturaV6 = esquemaCapturaV6;
|
|
982
1372
|
exports.esquemaConfig = esquemaConfig;
|
|
983
1373
|
exports.esquemaDeployment = esquemaDeployment;
|
|
1374
|
+
exports.esquemaDeploymentPromocion = esquemaDeploymentPromocion;
|
|
984
1375
|
exports.esquemaEquipo = esquemaEquipo;
|
|
985
1376
|
exports.esquemaEstadoDeployment = esquemaEstadoDeployment;
|
|
1377
|
+
exports.esquemaListaDeploymentsPromocion = esquemaListaDeploymentsPromocion;
|
|
986
1378
|
exports.esquemaPaginaDeployments = esquemaPaginaDeployments;
|
|
987
1379
|
exports.esquemaPaginaTeams = esquemaPaginaTeams;
|
|
988
1380
|
exports.esquemaPaginacion = esquemaPaginacion;
|
|
989
1381
|
exports.esquemaPedidoCaptura = esquemaPedidoCaptura;
|
|
990
1382
|
exports.evaluarCambios = evaluarCambios;
|
|
1383
|
+
exports.extraerAliasProduccion = extraerAliasProduccion;
|
|
1384
|
+
exports.extraerIdOUrlDeploy = extraerIdOUrlDeploy;
|
|
1385
|
+
exports.extraerUrlSalud = extraerUrlSalud;
|
|
991
1386
|
exports.ignorar = ignorar;
|
|
992
1387
|
exports.leerArgumentosCapturar = leerArgumentosCapturar;
|
|
993
1388
|
exports.leerArgumentosDesplegar = leerArgumentosDesplegar;
|
|
@@ -995,6 +1390,7 @@ exports.leerArgumentosMedir = leerArgumentosMedir;
|
|
|
995
1390
|
exports.leerConfig = leerConfig;
|
|
996
1391
|
exports.leerFlagsCli = leerFlagsCli;
|
|
997
1392
|
exports.leerRespuestaDeployments = leerRespuestaDeployments;
|
|
1393
|
+
exports.limpiarIdOUrlDeploy = limpiarIdOUrlDeploy;
|
|
998
1394
|
exports.medir = medir;
|
|
999
1395
|
exports.normalizarCarpeta = normalizarCarpeta;
|
|
1000
1396
|
exports.paquetesDeTurbo = paquetesDeTurbo;
|
|
@@ -1006,6 +1402,7 @@ exports.rangoFechasUtc = rangoFechasUtc;
|
|
|
1006
1402
|
exports.redactarToken = redactarToken;
|
|
1007
1403
|
exports.resolverEquipo = resolverEquipo;
|
|
1008
1404
|
exports.solicitarVercel = solicitarVercel;
|
|
1405
|
+
exports.tieneVariablesSensibles = tieneVariablesSensibles;
|
|
1009
1406
|
exports.ubicarEnRepo = ubicarEnRepo;
|
|
1010
1407
|
exports.validarConfig = validarConfig;
|
|
1011
1408
|
exports.validarFechaIso = validarFechaIso;
|