@squidcloud/cli 1.0.353 → 1.0.355

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +63 -607
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -2211,63 +2211,6 @@ isStream.transform = function (stream) {
2211
2211
  };
2212
2212
 
2213
2213
 
2214
- /***/ }),
2215
-
2216
- /***/ 1333:
2217
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2218
-
2219
- "use strict";
2220
-
2221
- Object.defineProperty(exports, "__esModule", ({ value: true }));
2222
- exports.assertDate = exports.assertEmail = exports.assertHexString = exports.assertUuid = exports.assertBoolean = exports.assertNumber = exports.assertString = void 0;
2223
- exports.formatError = formatError;
2224
- exports.assertNonNullable = assertNonNullable;
2225
- const Assertion_1 = __webpack_require__(6373);
2226
- const ChecksLib_1 = __webpack_require__(4665);
2227
- const Formatter_1 = __webpack_require__(6663);
2228
- function formatError(contextProvider, message, value) {
2229
- const context = (0, Assertion_1.getAssertionErrorFromProvider)(contextProvider);
2230
- if (typeof context === 'object') {
2231
- throw context;
2232
- }
2233
- const renderedValue = (0, Formatter_1.formatValue)(value);
2234
- return `${context ? `${context}: ` : ''}${message} ${renderedValue}`;
2235
- }
2236
- /*** Asserts that *value* is a *string*. */
2237
- const assertString = (value, context = undefined) => {
2238
- (0, Assertion_1.assertTruthy)((0, ChecksLib_1.isString)(value), () => formatError(context, 'Not a string', value));
2239
- };
2240
- exports.assertString = assertString;
2241
- const assertNumber = (value, context = undefined) => {
2242
- (0, Assertion_1.assertTruthy)((0, ChecksLib_1.isNumber)(value), () => formatError(context, 'Not a number', value));
2243
- };
2244
- exports.assertNumber = assertNumber;
2245
- const assertBoolean = (value, context = undefined) => {
2246
- (0, Assertion_1.assertTruthy)((0, ChecksLib_1.isBoolean)(value), () => formatError(context, 'Not a boolean', value));
2247
- };
2248
- exports.assertBoolean = assertBoolean;
2249
- const assertUuid = (value, context = undefined) => {
2250
- (0, Assertion_1.assertTruthy)((0, ChecksLib_1.isUuid)(value), () => formatError(context, 'Invalid uuid', value));
2251
- };
2252
- exports.assertUuid = assertUuid;
2253
- const assertHexString = (value, context = undefined) => {
2254
- (0, Assertion_1.assertTruthy)((0, ChecksLib_1.isHexString)(value), () => formatError(context, 'Invalid hex string', value));
2255
- };
2256
- exports.assertHexString = assertHexString;
2257
- const assertEmail = (value, context = undefined) => {
2258
- (0, Assertion_1.assertTruthy)((0, ChecksLib_1.isEmail)(value), () => formatError(context, 'Invalid email', value));
2259
- };
2260
- exports.assertEmail = assertEmail;
2261
- /** Asserts that the `value` type is a `Date` object. */
2262
- const assertDate = (value, context = undefined) => {
2263
- (0, Assertion_1.assertTruthy)(value instanceof Date, () => formatError(context, 'Invalid Date', value));
2264
- };
2265
- exports.assertDate = assertDate;
2266
- function assertNonNullable(value, context) {
2267
- (0, Assertion_1.assertTruthy)((0, ChecksLib_1.isNonNullable)(value), () => formatError(context, `Value is ${value === undefined ? 'undefined' : 'null'}`, value));
2268
- }
2269
- //# sourceMappingURL=AssertionsLib.js.map
2270
-
2271
2214
  /***/ }),
2272
2215
 
2273
2216
  /***/ 1334:
@@ -8168,7 +8111,7 @@ const environment_1 = __webpack_require__(722);
8168
8111
  const http_1 = __webpack_require__(866);
8169
8112
  const global_utils_1 = __webpack_require__(6334);
8170
8113
  const console_app_utils_1 = __webpack_require__(7580);
8171
- const assertic_1 = __webpack_require__(5036);
8114
+ const assertic_1 = __webpack_require__(3205);
8172
8115
  async function reportLocalBackendInitialized(appId, apiKey, appRegion, verbose) {
8173
8116
  const stage = appRegion === 'local' ? 'local' : appRegion.endsWith('.sandbox') ? 'sandbox' : 'prod';
8174
8117
  const consoleRegion = (0, console_app_utils_1.getConsoleAppRegionByStage)(stage);
@@ -8514,6 +8457,63 @@ module.exports = require("string_decoder");
8514
8457
 
8515
8458
  /***/ }),
8516
8459
 
8460
+ /***/ 3205:
8461
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8462
+
8463
+ "use strict";
8464
+ __webpack_require__.r(__webpack_exports__);
8465
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8466
+ /* harmony export */ $a: () => (/* binding */ W),
8467
+ /* harmony export */ $u: () => (/* binding */ G),
8468
+ /* harmony export */ arrayAssertion: () => (/* binding */ S),
8469
+ /* harmony export */ assertArray: () => (/* binding */ E),
8470
+ /* harmony export */ assertBoolean: () => (/* binding */ Z),
8471
+ /* harmony export */ assertDate: () => (/* binding */ O),
8472
+ /* harmony export */ assertEmail: () => (/* binding */ q),
8473
+ /* harmony export */ assertHexString: () => (/* binding */ N),
8474
+ /* harmony export */ assertNonNullable: () => (/* binding */ V),
8475
+ /* harmony export */ assertNumber: () => (/* binding */ z),
8476
+ /* harmony export */ assertObject: () => (/* binding */ b),
8477
+ /* harmony export */ assertRecord: () => (/* binding */ B),
8478
+ /* harmony export */ assertString: () => (/* binding */ k),
8479
+ /* harmony export */ assertTruthy: () => (/* binding */ g),
8480
+ /* harmony export */ assertUuid: () => (/* binding */ I),
8481
+ /* harmony export */ callValueAssertion: () => (/* binding */ j),
8482
+ /* harmony export */ checkArrayHasUniqueElements: () => (/* binding */ e),
8483
+ /* harmony export */ checkArraysHasEqualElementsByComparator: () => (/* binding */ r),
8484
+ /* harmony export */ checkArraysHaveEqualElements: () => (/* binding */ o),
8485
+ /* harmony export */ fail: () => (/* binding */ v),
8486
+ /* harmony export */ formatError: () => (/* binding */ x),
8487
+ /* harmony export */ formatValue: () => (/* binding */ $),
8488
+ /* harmony export */ getAssertionErrorFromProvider: () => (/* binding */ m),
8489
+ /* harmony export */ getErrorMessage: () => (/* binding */ p),
8490
+ /* harmony export */ getMessageFromError: () => (/* binding */ X),
8491
+ /* harmony export */ isBoolean: () => (/* binding */ u),
8492
+ /* harmony export */ isDate: () => (/* binding */ t),
8493
+ /* harmony export */ isEmail: () => (/* binding */ s),
8494
+ /* harmony export */ isHexString: () => (/* binding */ A),
8495
+ /* harmony export */ isNonNullable: () => (/* binding */ D),
8496
+ /* harmony export */ isNumber: () => (/* binding */ n),
8497
+ /* harmony export */ isString: () => (/* binding */ F),
8498
+ /* harmony export */ isUuid: () => (/* binding */ l),
8499
+ /* harmony export */ nullOr: () => (/* binding */ K),
8500
+ /* harmony export */ objectAssertion: () => (/* binding */ _),
8501
+ /* harmony export */ recordAssertion: () => (/* binding */ U),
8502
+ /* harmony export */ setDefaultAssertionErrorFactory: () => (/* binding */ y),
8503
+ /* harmony export */ stringAssertion: () => (/* binding */ M),
8504
+ /* harmony export */ truthy: () => (/* binding */ C),
8505
+ /* harmony export */ tryCatch: () => (/* binding */ P),
8506
+ /* harmony export */ undefinedOr: () => (/* binding */ J),
8507
+ /* harmony export */ validateArray: () => (/* binding */ R),
8508
+ /* harmony export */ validateObject: () => (/* binding */ Q),
8509
+ /* harmony export */ validateRecord: () => (/* binding */ T),
8510
+ /* harmony export */ valueOr: () => (/* binding */ H)
8511
+ /* harmony export */ });
8512
+ function u(u){return"boolean"==typeof u}function F(u){return"string"==typeof u}function n(u){return"number"==typeof u}function t(u){return u instanceof Date}function e(u,F){if(u.length<=1)return!0;const n=new Set;for(const t of u){const u=F(t);if(n.has(u))return!1;n.add(u)}return!0}function o(u,F){return r(u,F,((u,F)=>u===F))}function r(u,F,n){if(u===F)return!0;if(!u||!F)return!1;if(u.length!==F.length)return!1;for(let t=0;t<u.length;t++)if(!n(u[t],F[t]))return!1;return!0}const i=/^[-!#$%&'*+/\d=?A-Z^_a-z{|}~](\.?[-!#$%&'*+/\d=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z\d])*\.[a-zA-Z](-?[a-zA-Z\d])+$/,a=/^(?!\.)((?!.*\.{2})[a-zA-Z0-9\u0080-\u00FF\u0100-\u017F\u0180-\u024F\u0250-\u02AF\u0300-\u036F\u0370-\u03FF\u0400-\u04FF\u0500-\u052F\u0530-\u058F\u0590-\u05FF\u0600-\u06FF\u0700-\u074F\u0750-\u077F\u0780-\u07BF\u07C0-\u07FF\u0900-\u097F\u0980-\u09FF\u0A00-\u0A7F\u0A80-\u0AFF\u0B00-\u0B7F\u0B80-\u0BFF\u0C00-\u0C7F\u0C80-\u0CFF\u0D00-\u0D7F\u0D80-\u0DFF\u0E00-\u0E7F\u0E80-\u0EFF\u0F00-\u0FFF\u1000-\u109F\u10A0-\u10FF\u1100-\u11FF\u1200-\u137F\u1380-\u139F\u13A0-\u13FF\u1400-\u167F\u1680-\u169F\u16A0-\u16FF\u1700-\u171F\u1720-\u173F\u1740-\u175F\u1760-\u177F\u1780-\u17FF\u1800-\u18AF\u1900-\u194F\u1950-\u197F\u1980-\u19DF\u19E0-\u19FF\u1A00-\u1A1F\u1B00-\u1B7F\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u1E00-\u1EFF\u1F00-\u1FFF\u20D0-\u20FF\u2100-\u214F\u2C00-\u2C5F\u2C60-\u2C7F\u2C80-\u2CFF\u2D00-\u2D2F\u2D30-\u2D7F\u2D80-\u2DDF\u2F00-\u2FDF\u2FF0-\u2FFF\u3040-\u309F\u30A0-\u30FF\u3100-\u312F\u3130-\u318F\u3190-\u319F\u31C0-\u31EF\u31F0-\u31FF\u3200-\u32FF\u3300-\u33FF\u3400-\u4DBF\u4DC0-\u4DFF\u4E00-\u9FFF\uA000-\uA48F\uA490-\uA4CF\uA700-\uA71F\uA800-\uA82F\uA840-\uA87F\uAC00-\uD7AF\uF900-\uFAFF.!#$%&'*+-/=?^_`{|}~\-\d]+)@(?!\.)([a-zA-Z0-9\u0080-\u00FF\u0100-\u017F\u0180-\u024F\u0250-\u02AF\u0300-\u036F\u0370-\u03FF\u0400-\u04FF\u0500-\u052F\u0530-\u058F\u0590-\u05FF\u0600-\u06FF\u0700-\u074F\u0750-\u077F\u0780-\u07BF\u07C0-\u07FF\u0900-\u097F\u0980-\u09FF\u0A00-\u0A7F\u0A80-\u0AFF\u0B00-\u0B7F\u0B80-\u0BFF\u0C00-\u0C7F\u0C80-\u0CFF\u0D00-\u0D7F\u0D80-\u0DFF\u0E00-\u0E7F\u0E80-\u0EFF\u0F00-\u0FFF\u1000-\u109F\u10A0-\u10FF\u1100-\u11FF\u1200-\u137F\u1380-\u139F\u13A0-\u13FF\u1400-\u167F\u1680-\u169F\u16A0-\u16FF\u1700-\u171F\u1720-\u173F\u1740-\u175F\u1760-\u177F\u1780-\u17FF\u1800-\u18AF\u1900-\u194F\u1950-\u197F\u1980-\u19DF\u19E0-\u19FF\u1A00-\u1A1F\u1B00-\u1B7F\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u1E00-\u1EFF\u1F00-\u1FFF\u20D0-\u20FF\u2100-\u214F\u2C00-\u2C5F\u2C60-\u2C7F\u2C80-\u2CFF\u2D00-\u2D2F\u2D30-\u2D7F\u2D80-\u2DDF\u2F00-\u2FDF\u2FF0-\u2FFF\u3040-\u309F\u30A0-\u30FF\u3100-\u312F\u3130-\u318F\u3190-\u319F\u31C0-\u31EF\u31F0-\u31FF\u3200-\u32FF\u3300-\u33FF\u3400-\u4DBF\u4DC0-\u4DFF\u4E00-\u9FFF\uA000-\uA48F\uA490-\uA4CF\uA700-\uA71F\uA800-\uA82F\uA840-\uA87F\uAC00-\uD7AF\uF900-\uFAFF\-.\d]+)((\.([a-zA-Z\u0080-\u00FF\u0100-\u017F\u0180-\u024F\u0250-\u02AF\u0300-\u036F\u0370-\u03FF\u0400-\u04FF\u0500-\u052F\u0530-\u058F\u0590-\u05FF\u0600-\u06FF\u0700-\u074F\u0750-\u077F\u0780-\u07BF\u07C0-\u07FF\u0900-\u097F\u0980-\u09FF\u0A00-\u0A7F\u0A80-\u0AFF\u0B00-\u0B7F\u0B80-\u0BFF\u0C00-\u0C7F\u0C80-\u0CFF\u0D00-\u0D7F\u0D80-\u0DFF\u0E00-\u0E7F\u0E80-\u0EFF\u0F00-\u0FFF\u1000-\u109F\u10A0-\u10FF\u1100-\u11FF\u1200-\u137F\u1380-\u139F\u13A0-\u13FF\u1400-\u167F\u1680-\u169F\u16A0-\u16FF\u1700-\u171F\u1720-\u173F\u1740-\u175F\u1760-\u177F\u1780-\u17FF\u1800-\u18AF\u1900-\u194F\u1950-\u197F\u1980-\u19DF\u19E0-\u19FF\u1A00-\u1A1F\u1B00-\u1B7F\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u1E00-\u1EFF\u1F00-\u1FFF\u20D0-\u20FF\u2100-\u214F\u2C00-\u2C5F\u2C60-\u2C7F\u2C80-\u2CFF\u2D00-\u2D2F\u2D30-\u2D7F\u2D80-\u2DDF\u2F00-\u2FDF\u2FF0-\u2FFF\u3040-\u309F\u30A0-\u30FF\u3100-\u312F\u3130-\u318F\u3190-\u319F\u31C0-\u31EF\u31F0-\u31FF\u3200-\u32FF\u3300-\u33FF\u3400-\u4DBF\u4DC0-\u4DFF\u4E00-\u9FFF\uA000-\uA48F\uA490-\uA4CF\uA700-\uA71F\uA800-\uA82F\uA840-\uA87F\uAC00-\uD7AF\uF900-\uFAFF]){2,63})+)$/i;function s(u,n={allowInternationalDomains:!1}){if(!F(u)||0===u.length||u.length>254)return!1;if(!(n.allowInternationalDomains?a:i).test(u))return!1;const t=u.split("@");return!(t[0].length>64)&&!t[1].split(".").some((u=>u.length>63))}const c=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function l(u){return F(u)&&c.test(u)}const f=/^[0-9a-fA-F]*$/;function A(u){return F(u)&&f.test(u)}function D(u){return null!=u}function $(u){return void 0===u?"<undefined>":"symbol"==typeof u?u.toString():null===u?"<null>":`<${typeof u}:${u}>`}const d=u=>new Error(u);let h=d;function y(u){h=u||d}function g(u,F,...n){u||v(F,...n)}function C(u,F,...n){return g(u,F,...n),u}function v(u,...F){const n=m(u);if("object"==typeof n)throw n;throw h(n||"Assertion error",...F)}function m(u){return void 0===u?"":"string"==typeof u?u:u()}function p(u){const F=m(u);return"string"==typeof F?F:F.message||"<no error message>"}function b(u,F,n=void 0,t={}){const e=()=>p(n),o=u=>{const F=e();return 0===F.length?u:`${F} ${u}`};g("object"==typeof u,(()=>o("is not an object: "+typeof u))),g(void 0!==u,(()=>o("is not defined"))),g(null!==u,(()=>o("is null"))),g(!Array.isArray(u),(()=>o("is an array.")));const r=Object.entries(F);if(t.failOnUnknownFields){const F=t.allowedUnknownFieldNames||[];for(const n in u)g(F.includes(n)||r.some((([u])=>n===u)),o(`property can't be checked: ${n}`))}let i;for(const[F,n]of r){g("function"==typeof n||"object"==typeof n&&null!==n,(()=>`${e()}.${F} assertion is not an object or a function: ${typeof n}`));const t=u[F],o=()=>`${e()}.${F}`;if("object"==typeof n)g(!Array.isArray(t),(()=>`${e()}.${o()} use arrayAssertion() to create a ValueAssertion for an array`)),b(t,n,o);else if(g("function"==typeof n,(()=>`${e()}.${o()} assertion is not a function`)),"$o"===F)i=n;else{const u=n(t,o);g(void 0===u,`Assertion function must assert (void) but it returns a value: ${u}. Wrap with $u()?`)}}i&&i(u,n)}function E(u,F,n={},t=void 0){var o,r;const i=L(t);g(Array.isArray(u),(()=>`${i()}value is not an array: ${u}`));const a=null!==(o=n.minLength)&&void 0!==o?o:0,s=null!==(r=n.maxLength)&&void 0!==r?r:1/0;g(u.length>=a,(()=>`${i()}array length < minLength. Array length: ${u.length}, minLength: ${a}`)),g(u.length<=s,(()=>`${i()}array length > maxLength. Array length: ${u.length}, maxLength: ${s}`)),n.uniqueByIdentity&&g(e(u,n.uniqueByIdentity),(()=>`${i()}array contains non-unique elements`));let c=0;const l=()=>`${i("no-space-separator")}[${c}]`;for(;c<u.length;c++)w(u[c],F,l)}function B(u,F,n={},t=void 0){const e=L(t);g("object"==typeof u,(()=>`${e()}value is not an object: ${$(u)}`)),g(null!==u,(()=>`${e()}value is null`)),g(!Array.isArray(u),(()=>`${e()}the value is not a record, but is an array`));for(const[t,o]of Object.entries(u)){const u=()=>`${e("no-space-separator")}['${t}']`;n.keyAssertion&&w(t,n.keyAssertion,(()=>`${u()}, key assertion failed:`)),w(o,F,u);const{keyField:r}=n;if(r){g("object"==typeof o&&null!==o,(()=>`${u()} is not an object: ${$(o)}`));const F=o[r];g(F===t,(()=>`${u()} key value does not match object field '${r}' value: ${$(F)}`))}}n.$o&&n.$o(u,t)}function j(u,F,n){F(u,n)}function L(u){return(F="with-space-separator")=>{const n=p(u);return n?`${n}${"with-space-separator"===F?" ":""}`:""}}function w(u,F,n){"object"==typeof F?(g(!Array.isArray(u),(()=>`${n}: use arrayAssertion() to create a ValueAssertion for an array`)),b(u,F,n)):j(u,F,n)}function x(u,F,n){const t=m(u);if("object"==typeof t)throw t;return`${t?`${t}: `:""}${F} ${$(n)}`}const k=(u,n=void 0)=>{g(F(u),(()=>x(n,"Not a string",u)))},z=(u,F=void 0)=>{g(n(u),(()=>x(F,"Not a number",u)))},Z=(F,n=void 0)=>{g(u(F),(()=>x(n,"Not a boolean",F)))},I=(u,F=void 0)=>{g(l(u),(()=>x(F,"Invalid uuid",u)))},N=(u,F=void 0)=>{g(A(u),(()=>x(F,"Invalid hex string",u)))},q=(u,F=void 0)=>{g(s(u),(()=>x(F,"Invalid email",u)))},O=(u,F=void 0)=>{g(u instanceof Date,(()=>x(F,"Invalid Date",u)))};function V(u,F){g(D(u),(()=>x(F,"Value is "+(void 0===u?"undefined":"null"),u)))}function _(u,F=void 0){return n=>b(n,u,F)}function S(u,F={}){const{minLength:n,maxLength:t}=F;return g((null!=n?n:0)<=(null!=t?t:1/0),`minLength must be < maxLength! minLength ${n}, maxLength: ${t}`),g((null!=n?n:0)>=0,`minLength must be a positive number: ${n}`),g((null!=t?t:0)>=0,`maxLength must be a positive number: ${t}`),(n,t=void 0)=>{E(n,u,F,t)}}function U(u,F={}){return(n,t=void 0)=>{B(n,u,F,t)}}function W(u,F){return g("function"==typeof u,`"check" is not a function: ${u}`),(n,t=void 0)=>g(u(n),(()=>{let u=p(t)||"Check is failed";return u.endsWith(":")||(u+=":"),`${u} ${p(F)||("object"==typeof n?"[object]":`'${n}'`)}`}))}function G(u,F){return W(u,F)}function H(u,F){return(n,t=void 0)=>{n!==u&&("object"==typeof F?b(n,F,t):j(n,F,t))}}function J(u){return H(void 0,u)}function K(u){return H(null,u)}const M=u=>(F,n=void 0)=>{var t,e;k(F,n),g(F.length>=(null!==(t=u.minLength)&&void 0!==t?t:0),`${p(n)} length is too small: ${F.length} < ${u.minLength}`),g(F.length<=(null!==(e=u.maxLength)&&void 0!==e?e:1/0),`${p(n)} length is too large ${F.length} > ${u.maxLength}`)};function P(u){try{u()}catch(u){return u instanceof Error&&u.message||`${u}`}}function Q(u,F,n=void 0,t={}){return P((()=>b(u,F,n,t)))}function R(u,F,n={},t=void 0){return P((()=>E(u,F,n,t)))}function T(u,F,n={},t=void 0){return P((()=>B(u,F,n,t)))}function X(u,F){return u instanceof Error?u.message:null!=F?F:`${u}`}
8513
+ //# sourceMappingURL=index.esm.js.map
8514
+
8515
+ /***/ }),
8516
+
8517
8517
  /***/ 3339:
8518
8518
  /***/ ((module) => {
8519
8519
 
@@ -9211,7 +9211,7 @@ exports.omitSquidDevId = omitSquidDevId;
9211
9211
  * It is the combination of the application id (as shown in the console), environment id (dev, prod) and the
9212
9212
  * developer id (if exists). For example - "fdgfd90ds-dev-1234567890abcdef"
9213
9213
  */
9214
- const assertic_1 = __webpack_require__(5036);
9214
+ const assertic_1 = __webpack_require__(3205);
9215
9215
  /** @internal */
9216
9216
  function parseAppId(appId) {
9217
9217
  (0, assertic_1.assertString)(appId, 'Invalid application ID');
@@ -10289,27 +10289,6 @@ module.exports = class DirectoryExistsPlugin {
10289
10289
  };
10290
10290
 
10291
10291
 
10292
- /***/ }),
10293
-
10294
- /***/ 3704:
10295
- /***/ ((__unused_webpack_module, exports) => {
10296
-
10297
- "use strict";
10298
-
10299
- Object.defineProperty(exports, "__esModule", ({ value: true }));
10300
- exports.getMessageFromError = getMessageFromError;
10301
- /**
10302
- * Extracts a string message from the error.
10303
- * Uses `error.message` field by default if available.
10304
- */
10305
- function getMessageFromError(error, defaultMessage) {
10306
- if (error instanceof Error) {
10307
- return error.message;
10308
- }
10309
- return defaultMessage !== null && defaultMessage !== void 0 ? defaultMessage : `${error}`;
10310
- }
10311
- //# sourceMappingURL=Utils.js.map
10312
-
10313
10292
  /***/ }),
10314
10293
 
10315
10294
  /***/ 3878:
@@ -11231,37 +11210,6 @@ class RootsPlugin {
11231
11210
  module.exports = RootsPlugin;
11232
11211
 
11233
11212
 
11234
- /***/ }),
11235
-
11236
- /***/ 4077:
11237
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
11238
-
11239
- "use strict";
11240
-
11241
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11242
- if (k2 === undefined) k2 = k;
11243
- var desc = Object.getOwnPropertyDescriptor(m, k);
11244
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
11245
- desc = { enumerable: true, get: function() { return m[k]; } };
11246
- }
11247
- Object.defineProperty(o, k2, desc);
11248
- }) : (function(o, m, k, k2) {
11249
- if (k2 === undefined) k2 = k;
11250
- o[k2] = m[k];
11251
- }));
11252
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
11253
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11254
- };
11255
- Object.defineProperty(exports, "__esModule", ({ value: true }));
11256
- __exportStar(__webpack_require__(6373), exports);
11257
- __exportStar(__webpack_require__(8596), exports);
11258
- __exportStar(__webpack_require__(1333), exports);
11259
- __exportStar(__webpack_require__(4665), exports);
11260
- __exportStar(__webpack_require__(6663), exports);
11261
- __exportStar(__webpack_require__(8630), exports);
11262
- __exportStar(__webpack_require__(3704), exports);
11263
- //# sourceMappingURL=index.js.map
11264
-
11265
11213
  /***/ }),
11266
11214
 
11267
11215
  /***/ 4153:
@@ -13283,124 +13231,6 @@ function createFromFd(fd, options) {
13283
13231
  }
13284
13232
 
13285
13233
 
13286
- /***/ }),
13287
-
13288
- /***/ 4665:
13289
- /***/ ((__unused_webpack_module, exports) => {
13290
-
13291
- "use strict";
13292
-
13293
- Object.defineProperty(exports, "__esModule", ({ value: true }));
13294
- exports.isBoolean = isBoolean;
13295
- exports.isString = isString;
13296
- exports.isNumber = isNumber;
13297
- exports.isDate = isDate;
13298
- exports.checkArrayHasUniqueElements = checkArrayHasUniqueElements;
13299
- exports.checkArraysHaveEqualElements = checkArraysHaveEqualElements;
13300
- exports.checkArraysHasEqualElementsByComparator = checkArraysHasEqualElementsByComparator;
13301
- exports.isEmail = isEmail;
13302
- exports.isUuid = isUuid;
13303
- exports.isHexString = isHexString;
13304
- exports.isNonNullable = isNonNullable;
13305
- /** Returns `true` if the value is `boolean`. */
13306
- function isBoolean(value) {
13307
- return typeof value === 'boolean';
13308
- }
13309
- /** Returns `true` if the value is `string`. */
13310
- function isString(value) {
13311
- return typeof value === 'string';
13312
- }
13313
- /** Returns `true` if the value is `number`. */
13314
- function isNumber(value) {
13315
- return typeof value === 'number';
13316
- }
13317
- /** Returns `true` if the value is `Date` object. */
13318
- function isDate(value) {
13319
- return value instanceof Date;
13320
- }
13321
- /**
13322
- * Checks that array has only unique elements.
13323
- * Uses `identity` function to perform checks.
13324
- */
13325
- function checkArrayHasUniqueElements(array, identity) {
13326
- if (array.length <= 1) {
13327
- return true;
13328
- }
13329
- const set = new Set();
13330
- for (const e of array) {
13331
- const id = identity(e);
13332
- if (set.has(id)) {
13333
- return false;
13334
- }
13335
- set.add(id);
13336
- }
13337
- return true;
13338
- }
13339
- /**
13340
- * Checks if two arrays have equal elements.
13341
- * Compares elements with by reference.
13342
- * See `checkArraysHasEqualElementsByComparator` if you need to use a custom comparator.
13343
- */
13344
- function checkArraysHaveEqualElements(array1, array2) {
13345
- return checkArraysHasEqualElementsByComparator(array1, array2, (e1, e2) => e1 === e2);
13346
- }
13347
- /**
13348
- * Checks that two arrays have equal elements.
13349
- * Returns `true` if all elements and their indexes are equal or false otherwise.
13350
- * Uses `comparator` to compare the elements.
13351
- */
13352
- function checkArraysHasEqualElementsByComparator(array1, array2, comparator) {
13353
- if (array1 === array2) {
13354
- return true;
13355
- }
13356
- if (!array1 || !array2) {
13357
- return false;
13358
- }
13359
- if (array1.length !== array2.length) {
13360
- return false;
13361
- }
13362
- for (let i = 0; i < array1.length; i++) {
13363
- if (!comparator(array1[i], array2[i])) {
13364
- return false;
13365
- }
13366
- }
13367
- return true;
13368
- }
13369
- const EMAIL_REGEX_REGULAR = /^[-!#$%&'*+/\d=?A-Z^_a-z{|}~](\.?[-!#$%&'*+/\d=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z\d])*\.[a-zA-Z](-?[a-zA-Z\d])+$/;
13370
- const EMAIL_REGEX_INTERNATIONAL = /^(?!\.)((?!.*\.{2})[a-zA-Z0-9\u0080-\u00FF\u0100-\u017F\u0180-\u024F\u0250-\u02AF\u0300-\u036F\u0370-\u03FF\u0400-\u04FF\u0500-\u052F\u0530-\u058F\u0590-\u05FF\u0600-\u06FF\u0700-\u074F\u0750-\u077F\u0780-\u07BF\u07C0-\u07FF\u0900-\u097F\u0980-\u09FF\u0A00-\u0A7F\u0A80-\u0AFF\u0B00-\u0B7F\u0B80-\u0BFF\u0C00-\u0C7F\u0C80-\u0CFF\u0D00-\u0D7F\u0D80-\u0DFF\u0E00-\u0E7F\u0E80-\u0EFF\u0F00-\u0FFF\u1000-\u109F\u10A0-\u10FF\u1100-\u11FF\u1200-\u137F\u1380-\u139F\u13A0-\u13FF\u1400-\u167F\u1680-\u169F\u16A0-\u16FF\u1700-\u171F\u1720-\u173F\u1740-\u175F\u1760-\u177F\u1780-\u17FF\u1800-\u18AF\u1900-\u194F\u1950-\u197F\u1980-\u19DF\u19E0-\u19FF\u1A00-\u1A1F\u1B00-\u1B7F\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u1E00-\u1EFF\u1F00-\u1FFF\u20D0-\u20FF\u2100-\u214F\u2C00-\u2C5F\u2C60-\u2C7F\u2C80-\u2CFF\u2D00-\u2D2F\u2D30-\u2D7F\u2D80-\u2DDF\u2F00-\u2FDF\u2FF0-\u2FFF\u3040-\u309F\u30A0-\u30FF\u3100-\u312F\u3130-\u318F\u3190-\u319F\u31C0-\u31EF\u31F0-\u31FF\u3200-\u32FF\u3300-\u33FF\u3400-\u4DBF\u4DC0-\u4DFF\u4E00-\u9FFF\uA000-\uA48F\uA490-\uA4CF\uA700-\uA71F\uA800-\uA82F\uA840-\uA87F\uAC00-\uD7AF\uF900-\uFAFF.!#$%&'*+-/=?^_`{|}~\-\d]+)@(?!\.)([a-zA-Z0-9\u0080-\u00FF\u0100-\u017F\u0180-\u024F\u0250-\u02AF\u0300-\u036F\u0370-\u03FF\u0400-\u04FF\u0500-\u052F\u0530-\u058F\u0590-\u05FF\u0600-\u06FF\u0700-\u074F\u0750-\u077F\u0780-\u07BF\u07C0-\u07FF\u0900-\u097F\u0980-\u09FF\u0A00-\u0A7F\u0A80-\u0AFF\u0B00-\u0B7F\u0B80-\u0BFF\u0C00-\u0C7F\u0C80-\u0CFF\u0D00-\u0D7F\u0D80-\u0DFF\u0E00-\u0E7F\u0E80-\u0EFF\u0F00-\u0FFF\u1000-\u109F\u10A0-\u10FF\u1100-\u11FF\u1200-\u137F\u1380-\u139F\u13A0-\u13FF\u1400-\u167F\u1680-\u169F\u16A0-\u16FF\u1700-\u171F\u1720-\u173F\u1740-\u175F\u1760-\u177F\u1780-\u17FF\u1800-\u18AF\u1900-\u194F\u1950-\u197F\u1980-\u19DF\u19E0-\u19FF\u1A00-\u1A1F\u1B00-\u1B7F\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u1E00-\u1EFF\u1F00-\u1FFF\u20D0-\u20FF\u2100-\u214F\u2C00-\u2C5F\u2C60-\u2C7F\u2C80-\u2CFF\u2D00-\u2D2F\u2D30-\u2D7F\u2D80-\u2DDF\u2F00-\u2FDF\u2FF0-\u2FFF\u3040-\u309F\u30A0-\u30FF\u3100-\u312F\u3130-\u318F\u3190-\u319F\u31C0-\u31EF\u31F0-\u31FF\u3200-\u32FF\u3300-\u33FF\u3400-\u4DBF\u4DC0-\u4DFF\u4E00-\u9FFF\uA000-\uA48F\uA490-\uA4CF\uA700-\uA71F\uA800-\uA82F\uA840-\uA87F\uAC00-\uD7AF\uF900-\uFAFF\-.\d]+)((\.([a-zA-Z\u0080-\u00FF\u0100-\u017F\u0180-\u024F\u0250-\u02AF\u0300-\u036F\u0370-\u03FF\u0400-\u04FF\u0500-\u052F\u0530-\u058F\u0590-\u05FF\u0600-\u06FF\u0700-\u074F\u0750-\u077F\u0780-\u07BF\u07C0-\u07FF\u0900-\u097F\u0980-\u09FF\u0A00-\u0A7F\u0A80-\u0AFF\u0B00-\u0B7F\u0B80-\u0BFF\u0C00-\u0C7F\u0C80-\u0CFF\u0D00-\u0D7F\u0D80-\u0DFF\u0E00-\u0E7F\u0E80-\u0EFF\u0F00-\u0FFF\u1000-\u109F\u10A0-\u10FF\u1100-\u11FF\u1200-\u137F\u1380-\u139F\u13A0-\u13FF\u1400-\u167F\u1680-\u169F\u16A0-\u16FF\u1700-\u171F\u1720-\u173F\u1740-\u175F\u1760-\u177F\u1780-\u17FF\u1800-\u18AF\u1900-\u194F\u1950-\u197F\u1980-\u19DF\u19E0-\u19FF\u1A00-\u1A1F\u1B00-\u1B7F\u1D00-\u1D7F\u1D80-\u1DBF\u1DC0-\u1DFF\u1E00-\u1EFF\u1F00-\u1FFF\u20D0-\u20FF\u2100-\u214F\u2C00-\u2C5F\u2C60-\u2C7F\u2C80-\u2CFF\u2D00-\u2D2F\u2D30-\u2D7F\u2D80-\u2DDF\u2F00-\u2FDF\u2FF0-\u2FFF\u3040-\u309F\u30A0-\u30FF\u3100-\u312F\u3130-\u318F\u3190-\u319F\u31C0-\u31EF\u31F0-\u31FF\u3200-\u32FF\u3300-\u33FF\u3400-\u4DBF\u4DC0-\u4DFF\u4E00-\u9FFF\uA000-\uA48F\uA490-\uA4CF\uA700-\uA71F\uA800-\uA82F\uA840-\uA87F\uAC00-\uD7AF\uF900-\uFAFF]){2,63})+)$/i;
13371
- /** Returns true if *email* is a valid email address. */
13372
- function isEmail(email, constraints = { allowInternationalDomains: false }) {
13373
- if (!isString(email) || email.length === 0 || email.length > 254) {
13374
- return false;
13375
- }
13376
- const regex = constraints.allowInternationalDomains ? EMAIL_REGEX_INTERNATIONAL : EMAIL_REGEX_REGULAR;
13377
- if (!regex.test(email)) {
13378
- return false;
13379
- }
13380
- // Validate each part.
13381
- const parts = email.split('@');
13382
- if (parts[0].length > 64) {
13383
- return false;
13384
- }
13385
- const domainParts = parts[1].split('.');
13386
- return !domainParts.some(part => part.length > 63);
13387
- }
13388
- const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
13389
- /** Returns *true* if *value* is a valid 'uuid' (v1..v5) string. */
13390
- function isUuid(value) {
13391
- return isString(value) && UUID_REGEX.test(value);
13392
- }
13393
- const HEX_STRING_REGEX = /^[0-9a-fA-F]*$/;
13394
- /** Returns *true* if *value* is a string that contains only hexadecimal characters or is empty. */
13395
- function isHexString(value) {
13396
- return isString(value) && HEX_STRING_REGEX.test(value);
13397
- }
13398
- /** Returns true if value is not 'null' and not 'undefined'. */
13399
- function isNonNullable(value) {
13400
- return value !== null && value !== undefined;
13401
- }
13402
- //# sourceMappingURL=ChecksLib.js.map
13403
-
13404
13234
  /***/ }),
13405
13235
 
13406
13236
  /***/ 4669:
@@ -14636,31 +14466,6 @@ class HookCodeFactory {
14636
14466
  module.exports = HookCodeFactory;
14637
14467
 
14638
14468
 
14639
- /***/ }),
14640
-
14641
- /***/ 5036:
14642
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
14643
-
14644
- "use strict";
14645
-
14646
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14647
- if (k2 === undefined) k2 = k;
14648
- var desc = Object.getOwnPropertyDescriptor(m, k);
14649
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14650
- desc = { enumerable: true, get: function() { return m[k]; } };
14651
- }
14652
- Object.defineProperty(o, k2, desc);
14653
- }) : (function(o, m, k, k2) {
14654
- if (k2 === undefined) k2 = k;
14655
- o[k2] = m[k];
14656
- }));
14657
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14658
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
14659
- };
14660
- Object.defineProperty(exports, "__esModule", ({ value: true }));
14661
- __exportStar(__webpack_require__(4077), exports);
14662
- //# sourceMappingURL=index.js.map
14663
-
14664
14469
  /***/ }),
14665
14470
 
14666
14471
  /***/ 5118:
@@ -17539,199 +17344,6 @@ function getLogPrefixString() {
17539
17344
  }
17540
17345
 
17541
17346
 
17542
- /***/ }),
17543
-
17544
- /***/ 6373:
17545
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
17546
-
17547
- "use strict";
17548
-
17549
- Object.defineProperty(exports, "__esModule", ({ value: true }));
17550
- exports.setDefaultAssertionErrorFactory = setDefaultAssertionErrorFactory;
17551
- exports.assertTruthy = assertTruthy;
17552
- exports.truthy = truthy;
17553
- exports.fail = fail;
17554
- exports.getAssertionErrorFromProvider = getAssertionErrorFromProvider;
17555
- exports.getErrorMessage = getErrorMessage;
17556
- exports.assertObject = assertObject;
17557
- exports.assertArray = assertArray;
17558
- exports.assertRecord = assertRecord;
17559
- exports.callValueAssertion = callValueAssertion;
17560
- const ChecksLib_1 = __webpack_require__(4665);
17561
- const Formatter_1 = __webpack_require__(6663);
17562
- const defaultAssertionErrorFactory = (message) => new Error(message);
17563
- let assertionErrorFactory = defaultAssertionErrorFactory;
17564
- /** Overrides the default error factory for assertions. */
17565
- function setDefaultAssertionErrorFactory(factory) {
17566
- assertionErrorFactory = factory || defaultAssertionErrorFactory;
17567
- }
17568
- /**
17569
- * Asserts that the *param* value is truthy using '!' operator or throws an Error.
17570
- * Now supports optional vararg parameters after the AssertionErrorProvider.
17571
- */
17572
- function assertTruthy(value, error, ...additionalData) {
17573
- if (!value) {
17574
- fail(error, ...additionalData);
17575
- }
17576
- }
17577
- /**
17578
- * Casts the 'value' to a non-nullable type or throws an error.
17579
- * Uses 'assertTruthy' to make the check.
17580
- * Now supports optional vararg parameters after the AssertionErrorProvider.
17581
- */
17582
- function truthy(value, error, ...additionalData) {
17583
- assertTruthy(value, error, ...additionalData);
17584
- return value;
17585
- }
17586
- /**
17587
- * Fails the assertion by throwing an error.
17588
- * Now supports optional vararg parameters after the AssertionErrorProvider.
17589
- */
17590
- function fail(error, ...additionalData) {
17591
- const errorMessage = getAssertionErrorFromProvider(error);
17592
- if (typeof errorMessage === 'object') {
17593
- throw errorMessage;
17594
- }
17595
- throw assertionErrorFactory(errorMessage || 'Assertion error', ...additionalData);
17596
- }
17597
- /** Returns validation context as a string. Calls errorProvider() if needed. */
17598
- function getAssertionErrorFromProvider(errorProvider) {
17599
- if (errorProvider === undefined) {
17600
- return '';
17601
- }
17602
- if (typeof errorProvider === 'string') {
17603
- return errorProvider;
17604
- }
17605
- return errorProvider();
17606
- }
17607
- /** Returns validation context as a string. Calls errorProvider() if needed. */
17608
- function getErrorMessage(errorProvider) {
17609
- const error = getAssertionErrorFromProvider(errorProvider);
17610
- return typeof error === 'string' ? error : error.message || '<no error message>';
17611
- }
17612
- /**
17613
- * Asserts that the object satisfies the schema using individual field assertions.
17614
- * Throws an error if not.
17615
- * Works only with non-array objects: use 'assertArray' to check arrays.
17616
- */
17617
- function assertObject(value, objectAssertion, errorContextProvider = undefined, constraints = {}) {
17618
- const ctx = () => {
17619
- return getErrorMessage(errorContextProvider);
17620
- };
17621
- const errorWithContext = (message) => {
17622
- const context = ctx();
17623
- return context.length === 0 ? message : `${context} ${message}`;
17624
- };
17625
- assertTruthy(typeof value === 'object', () => errorWithContext(`is not an object: ${typeof value}`));
17626
- assertTruthy(value !== undefined, () => errorWithContext(`is not defined`));
17627
- assertTruthy(value !== null, () => errorWithContext(`is null`));
17628
- assertTruthy(!Array.isArray(value), () => errorWithContext(`is an array.`));
17629
- const assertionEntries = Object.entries(objectAssertion);
17630
- if (constraints.failOnUnknownFields) {
17631
- const allowedUnknownFieldNames = constraints.allowedUnknownFieldNames || [];
17632
- for (const objectFieldName in value) {
17633
- const skipUnknownFieldCheck = allowedUnknownFieldNames.includes(objectFieldName);
17634
- assertTruthy(skipUnknownFieldCheck || assertionEntries.some(([assertionFieldName]) => objectFieldName === assertionFieldName), errorWithContext(`property can't be checked: ${objectFieldName}`));
17635
- }
17636
- }
17637
- let $o;
17638
- for (const [fieldKey, fieldAssertion] of assertionEntries) {
17639
- assertTruthy(typeof fieldAssertion === 'function' || (typeof fieldAssertion === 'object' && fieldAssertion !== null), () => `${ctx()}.${fieldKey} assertion is not an object or a function: ${typeof fieldAssertion}`);
17640
- const fieldValue = value[fieldKey];
17641
- const fieldCtx = () => `${ctx()}.${fieldKey}`;
17642
- if (typeof fieldAssertion === 'object') {
17643
- assertTruthy(!Array.isArray(fieldValue), () => `${ctx()}.${fieldCtx()} use arrayAssertion() to create a ValueAssertion for an array`);
17644
- assertObject(fieldValue, fieldAssertion, fieldCtx);
17645
- }
17646
- else {
17647
- assertTruthy(typeof fieldAssertion === 'function', () => `${ctx()}.${fieldCtx()} assertion is not a function`);
17648
- if (fieldKey === '$o') {
17649
- $o = fieldAssertion; // Will be run last.
17650
- }
17651
- else {
17652
- const checkResult = fieldAssertion(fieldValue, fieldCtx);
17653
- assertTruthy(checkResult === undefined, `Assertion function must assert (void) but it returns a value: ${checkResult}. Wrap with $u()?`);
17654
- }
17655
- }
17656
- }
17657
- if ($o) {
17658
- $o(value, errorContextProvider);
17659
- }
17660
- }
17661
- /**
17662
- * Asserts that the `value` is an array and every element in the array satisfy to the *elementAssertion*.
17663
- * Throws error if check fails.
17664
- */
17665
- function assertArray(value, elementAssertion, constraints = {}, errorContextProvider = undefined) {
17666
- var _a, _b;
17667
- const ctx = createChildNodeContextProvider(errorContextProvider);
17668
- assertTruthy(Array.isArray(value), () => `${ctx()}value is not an array: ${value}`);
17669
- const minLength = (_a = constraints.minLength) !== null && _a !== void 0 ? _a : 0;
17670
- const maxLength = (_b = constraints.maxLength) !== null && _b !== void 0 ? _b : Infinity;
17671
- assertTruthy(value.length >= minLength, () => `${ctx()}array length < minLength. Array length: ${value.length}, minLength: ${minLength}`);
17672
- assertTruthy(value.length <= maxLength, () => `${ctx()}array length > maxLength. Array length: ${value.length}, maxLength: ${maxLength}`);
17673
- if (constraints.uniqueByIdentity) {
17674
- assertTruthy((0, ChecksLib_1.checkArrayHasUniqueElements)(value, constraints.uniqueByIdentity), () => `${ctx()}array contains non-unique elements`);
17675
- }
17676
- let i = 0;
17677
- const elementErrorProvider = () => `${ctx('no-space-separator')}[${i}]`;
17678
- for (; i < value.length; i++) {
17679
- const element = value[i];
17680
- assertChildValue(element, elementAssertion, elementErrorProvider);
17681
- }
17682
- }
17683
- /**
17684
- * Asserts that the `value` is record of values of the given types.
17685
- * Throws error if check fails.
17686
- */
17687
- function assertRecord(value, valueAssertion, constraints = {}, errorContextProvider = undefined) {
17688
- const ctx = createChildNodeContextProvider(errorContextProvider);
17689
- assertTruthy(typeof value === 'object', () => `${ctx()}value is not an object: ${(0, Formatter_1.formatValue)(value)}`);
17690
- assertTruthy(value !== null, () => `${ctx()}value is null`);
17691
- assertTruthy(!Array.isArray(value), () => `${ctx()}the value is not a record, but is an array`);
17692
- // Check every key and value.
17693
- for (const [k, v] of Object.entries(value)) {
17694
- const keyCtx = () => `${ctx('no-space-separator')}['${k}']`;
17695
- if (constraints.keyAssertion) {
17696
- assertChildValue(k, constraints.keyAssertion, () => `${keyCtx()}, key assertion failed:`);
17697
- }
17698
- assertChildValue(v, valueAssertion, keyCtx);
17699
- const { keyField } = constraints;
17700
- if (keyField) {
17701
- assertTruthy(typeof v === 'object' && v !== null, () => `${keyCtx()} is not an object: ${(0, Formatter_1.formatValue)(v)}`);
17702
- const kv = v[keyField];
17703
- assertTruthy(kv === k, () => `${keyCtx()} key value does not match object field '${keyField}' value: ${(0, Formatter_1.formatValue)(kv)}`);
17704
- }
17705
- }
17706
- // Check the whole record with a cross-field check.
17707
- if (constraints.$o) {
17708
- constraints.$o(value, errorContextProvider);
17709
- }
17710
- }
17711
- /**
17712
- * Calls the assertion.
17713
- * Workaround for TS issue with assertion on genetic arrow function. See https://github.com/microsoft/TypeScript/issues/34523.
17714
- */
17715
- function callValueAssertion(value, valueAssertion, errorContextProvider) {
17716
- valueAssertion(value, errorContextProvider);
17717
- }
17718
- function createChildNodeContextProvider(errorContextProvider) {
17719
- return (mode = 'with-space-separator') => {
17720
- const text = getErrorMessage(errorContextProvider);
17721
- return text ? `${text}${mode === 'with-space-separator' ? ' ' : ''}` : '';
17722
- };
17723
- }
17724
- function assertChildValue(value, assertion, elementErrorProvider) {
17725
- if (typeof assertion === 'object') {
17726
- assertTruthy(!Array.isArray(value), () => `${elementErrorProvider}: use arrayAssertion() to create a ValueAssertion for an array`);
17727
- assertObject(value, assertion, elementErrorProvider);
17728
- }
17729
- else {
17730
- callValueAssertion(value, assertion, elementErrorProvider);
17731
- }
17732
- }
17733
- //# sourceMappingURL=Assertion.js.map
17734
-
17735
17347
  /***/ }),
17736
17348
 
17737
17349
  /***/ 6565:
@@ -17858,26 +17470,6 @@ __webpack_require__(4291);
17858
17470
  module.exports = __webpack_require__(2203);
17859
17471
 
17860
17472
 
17861
- /***/ }),
17862
-
17863
- /***/ 6663:
17864
- /***/ ((__unused_webpack_module, exports) => {
17865
-
17866
- "use strict";
17867
-
17868
- Object.defineProperty(exports, "__esModule", ({ value: true }));
17869
- exports.formatValue = formatValue;
17870
- function formatValue(value) {
17871
- return value === undefined
17872
- ? '<undefined>'
17873
- : typeof value === 'symbol'
17874
- ? value.toString()
17875
- : value === null
17876
- ? '<null>'
17877
- : `<${typeof value}:${value}>`;
17878
- }
17879
- //# sourceMappingURL=Formatter.js.map
17880
-
17881
17473
  /***/ }),
17882
17474
 
17883
17475
  /***/ 6807:
@@ -22768,7 +22360,7 @@ function exitWithError(...messages) {
22768
22360
  /***/ ((module) => {
22769
22361
 
22770
22362
  "use strict";
22771
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@squidcloud/cli","version":"1.0.353","description":"The Squid CLI","main":"dist/index.js","scripts":{"start":"node dist/index.js","start-ts":"ts-node -r tsconfig-paths/register src/index.ts","prebuild":"rimraf dist","build":"webpack --mode=production","build:dev":"webpack --mode=development","build:prod":"webpack --mode=production","lint":"eslint","link":"npm run build && chmod 755 dist/index.js && npm link","watch":"webpack --watch","deploy":"npm run build && npm pack --silent | xargs -I {} mv {} package.tgz && npm install -g package.tgz && rm -rf package.tgz","publish:public":"npm run build && npm publish --access public"},"files":["dist/**/*"],"bin":{"squid":"dist/index.js"},"keywords":[],"author":"","license":"ISC","engines":{"node":">=18.0.0"},"dependencies":{"@squidcloud/local-backend":"^1.0.353","copy-webpack-plugin":"^12.0.2","decompress":"^4.2.1","nodemon":"^3.1.3","terser-webpack-plugin":"^5.3.10","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.1.0","webpack":"^5.96.0","zip-webpack-plugin":"^4.0.1"},"devDependencies":{"@types/decompress":"^4.2.7","@types/node":"^20.16.10","terminal-link":"^3.0.0"}}');
22363
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@squidcloud/cli","version":"1.0.355","description":"The Squid CLI","main":"dist/index.js","scripts":{"start":"node dist/index.js","start-ts":"ts-node -r tsconfig-paths/register src/index.ts","prebuild":"rimraf dist","build":"webpack --mode=production","build:dev":"webpack --mode=development","build:prod":"webpack --mode=production","lint":"eslint","link":"npm run build && chmod 755 dist/index.js && npm link","watch":"webpack --watch","deploy":"npm run build && npm pack --silent | xargs -I {} mv {} package.tgz && npm install -g package.tgz && rm -rf package.tgz","publish:public":"npm run build && npm publish --access public"},"files":["dist/**/*"],"bin":{"squid":"dist/index.js"},"keywords":[],"author":"","license":"ISC","engines":{"node":">=18.0.0"},"dependencies":{"@squidcloud/local-backend":"^1.0.355","copy-webpack-plugin":"^12.0.2","decompress":"^4.2.1","nodemon":"^3.1.3","terser-webpack-plugin":"^5.3.10","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.1.0","webpack":"^5.96.0","zip-webpack-plugin":"^4.0.1"},"devDependencies":{"@types/decompress":"^4.2.7","@types/node":"^20.16.10","terminal-link":"^3.0.0"}}');
22772
22364
 
22773
22365
  /***/ }),
22774
22366
 
@@ -22900,7 +22492,7 @@ const resolve_1 = __webpack_require__(412);
22900
22492
  const resolve_2 = __webpack_require__(3878);
22901
22493
  const tsoa_utils_1 = __webpack_require__(1431);
22902
22494
  const packageJson = __importStar(__webpack_require__(8330));
22903
- const assertic_1 = __webpack_require__(5036);
22495
+ const assertic_1 = __webpack_require__(3205);
22904
22496
  function isEnvVarFalsy(variableName) {
22905
22497
  const value = process.env[variableName];
22906
22498
  return !value || value.toLowerCase() === 'false' || value === '0';
@@ -22964,106 +22556,6 @@ async function default_1({ verbose }) {
22964
22556
  }
22965
22557
 
22966
22558
 
22967
- /***/ }),
22968
-
22969
- /***/ 8596:
22970
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
22971
-
22972
- "use strict";
22973
-
22974
- Object.defineProperty(exports, "__esModule", ({ value: true }));
22975
- exports.stringAssertion = void 0;
22976
- exports.objectAssertion = objectAssertion;
22977
- exports.arrayAssertion = arrayAssertion;
22978
- exports.recordAssertion = recordAssertion;
22979
- exports.$a = $a;
22980
- exports.$u = $u;
22981
- exports.valueOr = valueOr;
22982
- exports.undefinedOr = undefinedOr;
22983
- exports.nullOr = nullOr;
22984
- const Assertion_1 = __webpack_require__(6373);
22985
- const AssertionsLib_1 = __webpack_require__(1333);
22986
- /** Wraps an object assertion as a value assertion. */
22987
- function objectAssertion(objectTypeAssertion, errorContextProvider = undefined) {
22988
- return o => (0, Assertion_1.assertObject)(o, objectTypeAssertion, errorContextProvider);
22989
- }
22990
- /**
22991
- * Creates an ValueAssertion for an array.
22992
- * The assertion check checks that array is defined,
22993
- * satisfies the `constraints` and every element of the array passes the `elementAssertion` check.
22994
- */
22995
- function arrayAssertion(elementAssertion, constraints = {}) {
22996
- const { minLength, maxLength } = constraints;
22997
- (0, Assertion_1.assertTruthy)((minLength !== null && minLength !== void 0 ? minLength : 0) <= (maxLength !== null && maxLength !== void 0 ? maxLength : Infinity), `minLength must be < maxLength! minLength ${minLength}, maxLength: ${maxLength}`);
22998
- (0, Assertion_1.assertTruthy)((minLength !== null && minLength !== void 0 ? minLength : 0) >= 0, `minLength must be a positive number: ${minLength}`);
22999
- (0, Assertion_1.assertTruthy)((maxLength !== null && maxLength !== void 0 ? maxLength : 0) >= 0, `maxLength must be a positive number: ${maxLength}`);
23000
- return (array, errorContextProvider = undefined) => {
23001
- (0, Assertion_1.assertArray)(array, elementAssertion, constraints, errorContextProvider);
23002
- };
23003
- }
23004
- /** Creates a value assertion for the record of elements where each of the elements passes `valueAssertion` check. */
23005
- function recordAssertion(valueAssertion, constraints = {}) {
23006
- return (value, errorContextProvider = undefined) => {
23007
- (0, Assertion_1.assertRecord)(value, valueAssertion, constraints, errorContextProvider);
23008
- };
23009
- }
23010
- /**
23011
- * Creates a new value assertion using *check* function.
23012
- * The assertion accepts the value as valid if 'check(value)' returns true or throws an error otherwise.
23013
- */
23014
- function $a(check, errorMessageProvider) {
23015
- (0, Assertion_1.assertTruthy)(typeof check === 'function', `"check" is not a function: ${check}`);
23016
- return (value, errorContextProvider = undefined) => (0, Assertion_1.assertTruthy)(check(value), () => {
23017
- let errorContext = (0, Assertion_1.getErrorMessage)(errorContextProvider) || 'Check is failed';
23018
- if (!errorContext.endsWith(':')) {
23019
- errorContext += ':';
23020
- }
23021
- const errorMessage = (0, Assertion_1.getErrorMessage)(errorMessageProvider);
23022
- return `${errorContext} ${errorMessage || (typeof value === 'object' ? '[object]' : `'${value}'`)}`;
23023
- });
23024
- }
23025
- /**
23026
- * Creates a new value assertion using *check* function.
23027
- * The assertion accepts the value as valid if 'check(value)' returns true or throws an error otherwise.
23028
- *
23029
- * Note: same as `$a` but forces processing of the check function argument as `unknown`.
23030
- */
23031
- function $u(check, errorMessageProvider) {
23032
- return $a(check, errorMessageProvider);
23033
- }
23034
- /**
23035
- * Creates an assertion that makes comparison by reference with the *expectedValue* before calling *orAssertion*.
23036
- * If comparison with the *expectedValue* succeeds, does not call the *orAssertion*.
23037
- */
23038
- function valueOr(expectedValue, orAssertion) {
23039
- return (value, errorContextProvider = undefined) => {
23040
- if (value === expectedValue)
23041
- return;
23042
- if (typeof orAssertion === 'object') {
23043
- (0, Assertion_1.assertObject)(value, orAssertion, errorContextProvider);
23044
- }
23045
- else {
23046
- (0, Assertion_1.callValueAssertion)(value, orAssertion, errorContextProvider);
23047
- }
23048
- };
23049
- }
23050
- /** Creates an assertion that succeeds if the value is *undefined* or calls *orAssertion* if the value is not *undefined*. */
23051
- function undefinedOr(orAssertion) {
23052
- return valueOr(undefined, orAssertion);
23053
- }
23054
- /** Creates an assertion that succeeds if the value is *null* or calls *orAssertion* if the value is not *undefined*. */
23055
- function nullOr(orAssertion) {
23056
- return valueOr(null, orAssertion);
23057
- }
23058
- const stringAssertion = (constraints) => (value, context = undefined) => {
23059
- var _a, _b;
23060
- (0, AssertionsLib_1.assertString)(value, context);
23061
- (0, Assertion_1.assertTruthy)(value.length >= ((_a = constraints.minLength) !== null && _a !== void 0 ? _a : 0), `${(0, Assertion_1.getErrorMessage)(context)} length is too small: ${value.length} < ${constraints.minLength}`);
23062
- (0, Assertion_1.assertTruthy)(value.length <= ((_b = constraints.maxLength) !== null && _b !== void 0 ? _b : Infinity), `${(0, Assertion_1.getErrorMessage)(context)} length is too large ${value.length} > ${constraints.maxLength}`);
23063
- };
23064
- exports.stringAssertion = stringAssertion;
23065
- //# sourceMappingURL=AssertionFactoriesLib.js.map
23066
-
23067
22559
  /***/ }),
23068
22560
 
23069
22561
  /***/ 8605:
@@ -23354,42 +22846,6 @@ exports.decode = function (buf, filenameEncoding) {
23354
22846
  }
23355
22847
 
23356
22848
 
23357
- /***/ }),
23358
-
23359
- /***/ 8630:
23360
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
23361
-
23362
- "use strict";
23363
-
23364
- Object.defineProperty(exports, "__esModule", ({ value: true }));
23365
- exports.tryCatch = tryCatch;
23366
- exports.validateObject = validateObject;
23367
- exports.validateArray = validateArray;
23368
- exports.validateRecord = validateRecord;
23369
- const Assertion_1 = __webpack_require__(6373);
23370
- /**
23371
- * Runs a function guarded by try/catch and returns an error message if the function throws an error.
23372
- * Returns 'undefined' if the function run with no errors.
23373
- */
23374
- function tryCatch(fn) {
23375
- try {
23376
- fn();
23377
- }
23378
- catch (error) {
23379
- return (error instanceof Error && error.message) || `${error}`;
23380
- }
23381
- }
23382
- function validateObject(value, assertion, errorContextProvider = undefined, constraints = {}) {
23383
- return tryCatch(() => (0, Assertion_1.assertObject)(value, assertion, errorContextProvider, constraints));
23384
- }
23385
- function validateArray(value, elementAssertion, constraints = {}, errorContextProvider = undefined) {
23386
- return tryCatch(() => (0, Assertion_1.assertArray)(value, elementAssertion, constraints, errorContextProvider));
23387
- }
23388
- function validateRecord(value, valueAssertion, constraints = {}, errorContextProvider = undefined) {
23389
- return tryCatch(() => (0, Assertion_1.assertRecord)(value, valueAssertion, constraints, errorContextProvider));
23390
- }
23391
- //# sourceMappingURL=Validation.js.map
23392
-
23393
22849
  /***/ }),
23394
22850
 
23395
22851
  /***/ 8659:
@@ -23637,7 +23093,7 @@ const fs = __importStar(__webpack_require__(1943));
23637
23093
  const http_1 = __webpack_require__(866);
23638
23094
  const communication_types_1 = __webpack_require__(3443);
23639
23095
  const console_app_utils_1 = __webpack_require__(7580);
23640
- const assertic_1 = __webpack_require__(5036);
23096
+ const assertic_1 = __webpack_require__(3205);
23641
23097
  const shell_runner_1 = __webpack_require__(3089);
23642
23098
  async function default_1(stage, appId, bundlePath, apiKey, verbose, direct, isUserSpecifiedPath, skipBuild, internalApiKey, environmentId) {
23643
23099
  if (!direct && !isUserSpecifiedPath && !skipBuild) {
@@ -25163,7 +24619,7 @@ const process_utils_1 = __webpack_require__(8251);
25163
24619
  const http_1 = __webpack_require__(866);
25164
24620
  const communication_types_1 = __webpack_require__(3443);
25165
24621
  const console_app_utils_1 = __webpack_require__(7580);
25166
- const assertic_1 = __webpack_require__(5036);
24622
+ const assertic_1 = __webpack_require__(3205);
25167
24623
  async function default_1(stage, appId, apiKey, environmentId) {
25168
24624
  const appIdWithEnvId = (0, communication_types_1.appIdWithEnvironmentId)(appId, environmentId);
25169
24625
  const regionPrefix = (0, console_app_utils_1.getConsoleAppRegionByStage)(stage);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/cli",
3
- "version": "1.0.353",
3
+ "version": "1.0.355",
4
4
  "description": "The Squid CLI",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -29,7 +29,7 @@
29
29
  "node": ">=18.0.0"
30
30
  },
31
31
  "dependencies": {
32
- "@squidcloud/local-backend": "^1.0.353",
32
+ "@squidcloud/local-backend": "^1.0.355",
33
33
  "copy-webpack-plugin": "^12.0.2",
34
34
  "decompress": "^4.2.1",
35
35
  "nodemon": "^3.1.3",