ec2-instance-running-scheduler 0.2.4 → 0.2.5
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/.jsii +3 -3
- package/assets/funcs/running-scheduler.lambda/index.js +100 -32
- package/assets/funcs/running-scheduler.lambda/index.js.map +2 -2
- package/lib/constructs/ec2-instance-running-scheduler.js +40 -9
- package/lib/funcs/running-scheduler-function.js +36 -3
- package/lib/stacks/ec2-instance-running-schedule-stack.js +2 -4
- package/package.json +8 -10
package/.jsii
CHANGED
|
@@ -8457,7 +8457,7 @@
|
|
|
8457
8457
|
"hasDefaultInterfaces": true
|
|
8458
8458
|
}
|
|
8459
8459
|
},
|
|
8460
|
-
"tscRootDir": "src"
|
|
8460
|
+
"tscRootDir": "/home/runner/work/ec2-instance-running-scheduler/ec2-instance-running-scheduler/src"
|
|
8461
8461
|
},
|
|
8462
8462
|
"name": "ec2-instance-running-scheduler",
|
|
8463
8463
|
"readme": {
|
|
@@ -9041,6 +9041,6 @@
|
|
|
9041
9041
|
"symbolId": "src/constructs/ec2-instance-running-scheduler:TargetResource"
|
|
9042
9042
|
}
|
|
9043
9043
|
},
|
|
9044
|
-
"version": "0.2.
|
|
9045
|
-
"fingerprint": "
|
|
9044
|
+
"version": "0.2.5",
|
|
9045
|
+
"fingerprint": "C/ABs7jWLjIsA7WxzhUh7G2ZNowySFYfITsqX7t8OiQ="
|
|
9046
9046
|
}
|
|
@@ -13829,7 +13829,13 @@ var require_axios = __commonJS({
|
|
|
13829
13829
|
var AxiosError = class _AxiosError extends Error {
|
|
13830
13830
|
static from(error, code, config, request, response, customProps) {
|
|
13831
13831
|
const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
|
|
13832
|
-
axiosError
|
|
13832
|
+
Object.defineProperty(axiosError, "cause", {
|
|
13833
|
+
__proto__: null,
|
|
13834
|
+
value: error,
|
|
13835
|
+
writable: true,
|
|
13836
|
+
enumerable: false,
|
|
13837
|
+
configurable: true
|
|
13838
|
+
});
|
|
13833
13839
|
axiosError.name = error.name;
|
|
13834
13840
|
if (error.status != null && axiosError.status == null) {
|
|
13835
13841
|
axiosError.status = error.status;
|
|
@@ -13961,7 +13967,13 @@ var require_axios = __commonJS({
|
|
|
13961
13967
|
throw new AxiosError("Blob is not supported. Use a Buffer instead.");
|
|
13962
13968
|
}
|
|
13963
13969
|
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
13964
|
-
|
|
13970
|
+
if (useBlob && typeof _Blob === "function") {
|
|
13971
|
+
return new _Blob([value]);
|
|
13972
|
+
}
|
|
13973
|
+
if (typeof Buffer !== "undefined") {
|
|
13974
|
+
return Buffer.from(value);
|
|
13975
|
+
}
|
|
13976
|
+
throw new AxiosError("Blob is not supported. Use a Buffer instead.", AxiosError.ERR_NOT_SUPPORT);
|
|
13965
13977
|
}
|
|
13966
13978
|
return value;
|
|
13967
13979
|
}
|
|
@@ -14063,9 +14075,7 @@ var require_axios = __commonJS({
|
|
|
14063
14075
|
this._pairs.push([name, value]);
|
|
14064
14076
|
};
|
|
14065
14077
|
prototype.toString = function toString2(encoder) {
|
|
14066
|
-
const _encode = encoder ?
|
|
14067
|
-
return encoder.call(this, value, encode$1);
|
|
14068
|
-
} : encode$1;
|
|
14078
|
+
const _encode = encoder ? (value) => encoder.call(this, value, encode$1) : encode$1;
|
|
14069
14079
|
return this._pairs.map(function each(pair) {
|
|
14070
14080
|
return _encode(pair[0]) + "=" + _encode(pair[1]);
|
|
14071
14081
|
}, "").join("&");
|
|
@@ -14077,6 +14087,7 @@ var require_axios = __commonJS({
|
|
|
14077
14087
|
if (!params) {
|
|
14078
14088
|
return url2;
|
|
14079
14089
|
}
|
|
14090
|
+
url2 = url2 || "";
|
|
14080
14091
|
const _options = utils$1.isFunction(options) ? {
|
|
14081
14092
|
serialize: options
|
|
14082
14093
|
} : options;
|
|
@@ -14538,7 +14549,7 @@ var require_axios = __commonJS({
|
|
|
14538
14549
|
function getEnv(key) {
|
|
14539
14550
|
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
14540
14551
|
}
|
|
14541
|
-
var VERSION = "1.18.
|
|
14552
|
+
var VERSION = "1.18.1";
|
|
14542
14553
|
function parseProtocol(url2) {
|
|
14543
14554
|
const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
|
|
14544
14555
|
return match && match[1] || "";
|
|
@@ -14560,13 +14571,13 @@ var require_axios = __commonJS({
|
|
|
14560
14571
|
const params = match[2];
|
|
14561
14572
|
const encoding = match[3] ? "base64" : "utf8";
|
|
14562
14573
|
const body = match[4];
|
|
14563
|
-
let mime;
|
|
14574
|
+
let mime = "";
|
|
14564
14575
|
if (type) {
|
|
14565
14576
|
mime = params ? type + params : type;
|
|
14566
14577
|
} else if (params) {
|
|
14567
14578
|
mime = "text/plain" + params;
|
|
14568
14579
|
}
|
|
14569
|
-
const buffer = Buffer.from(decodeURIComponent(body), encoding);
|
|
14580
|
+
const buffer = encoding === "base64" ? Buffer.from(body, "base64") : Buffer.from(decodeURIComponent(body), encoding);
|
|
14570
14581
|
if (asBlob) {
|
|
14571
14582
|
if (!_Blob) {
|
|
14572
14583
|
throw new AxiosError("Blob is not supported", AxiosError.ERR_NOT_SUPPORT);
|
|
@@ -15239,6 +15250,33 @@ var require_axios = __commonJS({
|
|
|
15239
15250
|
var kAxiosInstalledTunnel = /* @__PURE__ */ Symbol("axios.http.installedTunnel");
|
|
15240
15251
|
var tunnelingAgentCache = /* @__PURE__ */ new Map();
|
|
15241
15252
|
var tunnelingAgentCacheUser = /* @__PURE__ */ new WeakMap();
|
|
15253
|
+
var NODE_NATIVE_ENV_PROXY_SUPPORT = {
|
|
15254
|
+
22: 21,
|
|
15255
|
+
24: 5
|
|
15256
|
+
};
|
|
15257
|
+
function isNodeNativeEnvProxySupported(nodeVersion = process.versions && process.versions.node) {
|
|
15258
|
+
if (!nodeVersion) {
|
|
15259
|
+
return false;
|
|
15260
|
+
}
|
|
15261
|
+
const [major, minor] = nodeVersion.split(".").map((part) => Number(part));
|
|
15262
|
+
if (!Number.isInteger(major) || !Number.isInteger(minor)) {
|
|
15263
|
+
return false;
|
|
15264
|
+
}
|
|
15265
|
+
if (major > 24) {
|
|
15266
|
+
return true;
|
|
15267
|
+
}
|
|
15268
|
+
return NODE_NATIVE_ENV_PROXY_SUPPORT[major] != null && minor >= NODE_NATIVE_ENV_PROXY_SUPPORT[major];
|
|
15269
|
+
}
|
|
15270
|
+
function isNodeEnvProxyEnabled(agent, nodeVersion = process.versions && process.versions.node) {
|
|
15271
|
+
if (!isNodeNativeEnvProxySupported(nodeVersion)) {
|
|
15272
|
+
return false;
|
|
15273
|
+
}
|
|
15274
|
+
const agentOptions = agent && agent.options;
|
|
15275
|
+
return Boolean(agentOptions && utils$1.hasOwnProp(agentOptions, "proxyEnv") && agentOptions.proxyEnv != null);
|
|
15276
|
+
}
|
|
15277
|
+
function getProxyEnvAgent(options, configHttpAgent, configHttpsAgent) {
|
|
15278
|
+
return isHttps.test(options.protocol) ? configHttpsAgent || https.globalAgent : configHttpAgent || http.globalAgent;
|
|
15279
|
+
}
|
|
15242
15280
|
function getTunnelingAgent(agentOptions, userHttpsAgent) {
|
|
15243
15281
|
const key = agentOptions.protocol + "//" + agentOptions.hostname + ":" + (agentOptions.port || "") + "#" + (agentOptions.auth || "");
|
|
15244
15282
|
const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, /* @__PURE__ */ new Map()).get(userHttpsAgent) : tunnelingAgentCache;
|
|
@@ -15317,9 +15355,10 @@ var require_axios = __commonJS({
|
|
|
15317
15355
|
return false;
|
|
15318
15356
|
}
|
|
15319
15357
|
}
|
|
15320
|
-
function setProxy(options, configProxy, location, isRedirect, configHttpsAgent) {
|
|
15358
|
+
function setProxy(options, configProxy, location, isRedirect, configHttpsAgent, configHttpAgent) {
|
|
15321
15359
|
let proxy = configProxy;
|
|
15322
|
-
|
|
15360
|
+
const proxyEnvAgent = getProxyEnvAgent(options, configHttpAgent, configHttpsAgent);
|
|
15361
|
+
if (!proxy && proxy !== false && !isNodeEnvProxyEnabled(proxyEnvAgent)) {
|
|
15323
15362
|
const proxyUrl = getProxyForUrl(location);
|
|
15324
15363
|
if (proxyUrl) {
|
|
15325
15364
|
if (!shouldBypassProxy(location)) {
|
|
@@ -15410,7 +15449,7 @@ var require_axios = __commonJS({
|
|
|
15410
15449
|
}
|
|
15411
15450
|
}
|
|
15412
15451
|
options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
|
|
15413
|
-
setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent);
|
|
15452
|
+
setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent, configHttpAgent);
|
|
15414
15453
|
};
|
|
15415
15454
|
}
|
|
15416
15455
|
var isHttpAdapterSupported = typeof process !== "undefined" && utils$1.kindOf(process) === "process";
|
|
@@ -15495,10 +15534,12 @@ var require_axios = __commonJS({
|
|
|
15495
15534
|
let httpVersion = own2("httpVersion");
|
|
15496
15535
|
if (httpVersion === void 0) httpVersion = 1;
|
|
15497
15536
|
let http2Options = own2("http2Options");
|
|
15498
|
-
const responseType = own2("responseType");
|
|
15499
|
-
const responseEncoding = own2("responseEncoding");
|
|
15500
15537
|
const httpAgent = own2("httpAgent");
|
|
15501
15538
|
const httpsAgent = own2("httpsAgent");
|
|
15539
|
+
const configProxy = own2("proxy");
|
|
15540
|
+
const responseType = own2("responseType");
|
|
15541
|
+
const responseEncoding = own2("responseEncoding");
|
|
15542
|
+
const socketPath = own2("socketPath");
|
|
15502
15543
|
const method = own2("method").toUpperCase();
|
|
15503
15544
|
const maxRedirects = own2("maxRedirects");
|
|
15504
15545
|
const maxBodyLength = own2("maxBodyLength");
|
|
@@ -15588,7 +15629,8 @@ var require_axios = __commonJS({
|
|
|
15588
15629
|
}
|
|
15589
15630
|
});
|
|
15590
15631
|
const fullPath = buildFullPath(own2("baseURL"), own2("url"), own2("allowAbsoluteUrls"), config);
|
|
15591
|
-
const
|
|
15632
|
+
const urlBase = socketPath ? "http://localhost" : platform.hasBrowserEnv ? platform.origin : void 0;
|
|
15633
|
+
const parsed = new URL(fullPath, urlBase);
|
|
15592
15634
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
15593
15635
|
if (protocol === "data:") {
|
|
15594
15636
|
if (maxContentLength > -1) {
|
|
@@ -15712,11 +15754,10 @@ var require_axios = __commonJS({
|
|
|
15712
15754
|
try {
|
|
15713
15755
|
path$1 = buildURL(parsed.pathname + parsed.search, own2("params"), own2("paramsSerializer")).replace(/^\?/, "");
|
|
15714
15756
|
} catch (err) {
|
|
15715
|
-
|
|
15716
|
-
|
|
15717
|
-
|
|
15718
|
-
|
|
15719
|
-
return reject(customErr);
|
|
15757
|
+
return reject(AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config, null, null, {
|
|
15758
|
+
url: own2("url"),
|
|
15759
|
+
exists: true
|
|
15760
|
+
}));
|
|
15720
15761
|
}
|
|
15721
15762
|
headers.set("Accept-Encoding", utils$1.hasOwnProp(transitional, "advertiseZstdAcceptEncoding") && transitional.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING, false);
|
|
15722
15763
|
const options = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
@@ -15735,7 +15776,6 @@ var require_axios = __commonJS({
|
|
|
15735
15776
|
http2Options
|
|
15736
15777
|
});
|
|
15737
15778
|
!utils$1.isUndefined(lookup) && (options.lookup = lookup);
|
|
15738
|
-
const socketPath = own2("socketPath");
|
|
15739
15779
|
if (socketPath) {
|
|
15740
15780
|
if (typeof socketPath !== "string") {
|
|
15741
15781
|
return reject(new AxiosError("socketPath must be a string", AxiosError.ERR_BAD_OPTION_VALUE, config));
|
|
@@ -15753,7 +15793,7 @@ var require_axios = __commonJS({
|
|
|
15753
15793
|
} else {
|
|
15754
15794
|
options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
|
15755
15795
|
options.port = parsed.port;
|
|
15756
|
-
setProxy(options,
|
|
15796
|
+
setProxy(options, configProxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path, false, httpsAgent, httpAgent);
|
|
15757
15797
|
}
|
|
15758
15798
|
let transport;
|
|
15759
15799
|
let isNativeTransport = false;
|
|
@@ -15956,7 +15996,9 @@ var require_axios = __commonJS({
|
|
|
15956
15996
|
});
|
|
15957
15997
|
const boundSockets = /* @__PURE__ */ new Set();
|
|
15958
15998
|
req.on("socket", function handleRequestSocket(socket) {
|
|
15959
|
-
socket.setKeepAlive
|
|
15999
|
+
if (typeof socket.setKeepAlive === "function") {
|
|
16000
|
+
socket.setKeepAlive(true, 1e3 * 60);
|
|
16001
|
+
}
|
|
15960
16002
|
if (!socket[kAxiosSocketListener]) {
|
|
15961
16003
|
socket.on("error", function handleSocketError(err) {
|
|
15962
16004
|
const current = socket[kAxiosCurrentReq];
|
|
@@ -16068,7 +16110,11 @@ var require_axios = __commonJS({
|
|
|
16068
16110
|
const cookie = cookies2[i].replace(/^\s+/, "");
|
|
16069
16111
|
const eq = cookie.indexOf("=");
|
|
16070
16112
|
if (eq !== -1 && cookie.slice(0, eq) === name) {
|
|
16071
|
-
|
|
16113
|
+
try {
|
|
16114
|
+
return decodeURIComponent(cookie.slice(eq + 1));
|
|
16115
|
+
} catch (e) {
|
|
16116
|
+
return cookie.slice(eq + 1);
|
|
16117
|
+
}
|
|
16072
16118
|
}
|
|
16073
16119
|
}
|
|
16074
16120
|
return null;
|
|
@@ -16093,6 +16139,7 @@ var require_axios = __commonJS({
|
|
|
16093
16139
|
...thing
|
|
16094
16140
|
} : thing;
|
|
16095
16141
|
function mergeConfig(config1, config2) {
|
|
16142
|
+
config1 = config1 || {};
|
|
16096
16143
|
config2 = config2 || {};
|
|
16097
16144
|
const config = /* @__PURE__ */ Object.create(null);
|
|
16098
16145
|
Object.defineProperty(config, "hasOwnProperty", {
|
|
@@ -16217,7 +16264,7 @@ var require_axios = __commonJS({
|
|
|
16217
16264
|
headers.set(formHeaders);
|
|
16218
16265
|
return;
|
|
16219
16266
|
}
|
|
16220
|
-
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
16267
|
+
Object.entries(formHeaders || {}).forEach(([key, val]) => {
|
|
16221
16268
|
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
|
|
16222
16269
|
headers.set(key, val);
|
|
16223
16270
|
}
|
|
@@ -16241,7 +16288,11 @@ var require_axios = __commonJS({
|
|
|
16241
16288
|
if (auth) {
|
|
16242
16289
|
const username = utils$1.getSafeProp(auth, "username") || "";
|
|
16243
16290
|
const password = utils$1.getSafeProp(auth, "password") || "";
|
|
16244
|
-
|
|
16291
|
+
try {
|
|
16292
|
+
headers.set("Authorization", "Basic " + btoa(username + ":" + (password ? encodeUTF8$1(password) : "")));
|
|
16293
|
+
} catch (e) {
|
|
16294
|
+
throw AxiosError.from(e, AxiosError.ERR_BAD_OPTION_VALUE, config);
|
|
16295
|
+
}
|
|
16245
16296
|
}
|
|
16246
16297
|
if (utils$1.isFormData(data)) {
|
|
16247
16298
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv || utils$1.isReactNative(data)) {
|
|
@@ -16388,6 +16439,7 @@ var require_axios = __commonJS({
|
|
|
16388
16439
|
const protocol = parseProtocol(_config.url);
|
|
16389
16440
|
if (protocol && !platform.protocols.includes(protocol)) {
|
|
16390
16441
|
reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
|
|
16442
|
+
done();
|
|
16391
16443
|
return;
|
|
16392
16444
|
}
|
|
16393
16445
|
request.send(requestData || null);
|
|
@@ -16423,7 +16475,9 @@ var require_axios = __commonJS({
|
|
|
16423
16475
|
});
|
|
16424
16476
|
signals = null;
|
|
16425
16477
|
};
|
|
16426
|
-
signals.forEach((signal2) => signal2.addEventListener("abort", onabort
|
|
16478
|
+
signals.forEach((signal2) => signal2.addEventListener("abort", onabort, {
|
|
16479
|
+
once: true
|
|
16480
|
+
}));
|
|
16427
16481
|
const {
|
|
16428
16482
|
signal
|
|
16429
16483
|
} = controller;
|
|
@@ -16816,7 +16870,15 @@ var require_axios = __commonJS({
|
|
|
16816
16870
|
const canceledError = composedSignal.reason;
|
|
16817
16871
|
canceledError.config = config;
|
|
16818
16872
|
request && (canceledError.request = request);
|
|
16819
|
-
err !== canceledError
|
|
16873
|
+
if (err !== canceledError) {
|
|
16874
|
+
Object.defineProperty(canceledError, "cause", {
|
|
16875
|
+
__proto__: null,
|
|
16876
|
+
value: err,
|
|
16877
|
+
writable: true,
|
|
16878
|
+
enumerable: false,
|
|
16879
|
+
configurable: true
|
|
16880
|
+
});
|
|
16881
|
+
}
|
|
16820
16882
|
throw canceledError;
|
|
16821
16883
|
}
|
|
16822
16884
|
if (pendingBodyError) {
|
|
@@ -16828,9 +16890,15 @@ var require_axios = __commonJS({
|
|
|
16828
16890
|
throw err;
|
|
16829
16891
|
}
|
|
16830
16892
|
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
16831
|
-
|
|
16832
|
-
|
|
16893
|
+
const networkError = new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request, err && err.response);
|
|
16894
|
+
Object.defineProperty(networkError, "cause", {
|
|
16895
|
+
__proto__: null,
|
|
16896
|
+
value: err.cause || err,
|
|
16897
|
+
writable: true,
|
|
16898
|
+
enumerable: false,
|
|
16899
|
+
configurable: true
|
|
16833
16900
|
});
|
|
16901
|
+
throw networkError;
|
|
16834
16902
|
}
|
|
16835
16903
|
throw AxiosError.from(err, err && err.code, config, request, err && err.response);
|
|
16836
16904
|
}
|
|
@@ -16905,7 +16973,7 @@ var require_axios = __commonJS({
|
|
|
16905
16973
|
if (!adapter) {
|
|
16906
16974
|
const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
|
|
16907
16975
|
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
16908
|
-
throw new AxiosError(`There is no suitable adapter to dispatch the request ` + s,
|
|
16976
|
+
throw new AxiosError(`There is no suitable adapter to dispatch the request ` + s, AxiosError.ERR_NOT_SUPPORT);
|
|
16909
16977
|
}
|
|
16910
16978
|
return adapter;
|
|
16911
16979
|
}
|
|
@@ -16992,7 +17060,7 @@ var require_axios = __commonJS({
|
|
|
16992
17060
|
};
|
|
16993
17061
|
};
|
|
16994
17062
|
function assertOptions(options, schema, allowUnknown) {
|
|
16995
|
-
if (typeof options !== "object") {
|
|
17063
|
+
if (typeof options !== "object" || options === null) {
|
|
16996
17064
|
throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
|
|
16997
17065
|
}
|
|
16998
17066
|
const keys = Object.keys(options);
|
|
@@ -24368,7 +24436,7 @@ mime-types/index.js:
|
|
|
24368
24436
|
*)
|
|
24369
24437
|
|
|
24370
24438
|
axios/dist/node/axios.cjs:
|
|
24371
|
-
(*! Axios v1.18.
|
|
24439
|
+
(*! Axios v1.18.1 Copyright (c) 2026 Matt Zabriskie and contributors *)
|
|
24372
24440
|
|
|
24373
24441
|
safe-buffer/index.js:
|
|
24374
24442
|
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|