hot-updater 0.16.2 → 0.16.4

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.
@@ -122,15 +122,14 @@ var __webpack_modules__ = {
122
122
  ++pos;
123
123
  ++curLine;
124
124
  lineStart = pos;
125
- } else if (10 === ch || 13 === ch) {
126
- if ("template" === type) {
127
- out += input.slice(chunkStart, pos) + "\n";
128
- ++pos;
129
- if (13 === ch && 10 === input.charCodeAt(pos)) ++pos;
130
- ++curLine;
131
- chunkStart = lineStart = pos;
132
- } else errors.unterminated(initialPos, initialLineStart, initialCurLine);
133
- } else ++pos;
125
+ } else if (10 === ch || 13 === ch) if ("template" === type) {
126
+ out += input.slice(chunkStart, pos) + "\n";
127
+ ++pos;
128
+ if (13 === ch && 10 === input.charCodeAt(pos)) ++pos;
129
+ ++curLine;
130
+ chunkStart = lineStart = pos;
131
+ } else errors.unterminated(initialPos, initialLineStart, initialCurLine);
132
+ else ++pos;
134
133
  }
135
134
  return {
136
135
  pos,
@@ -204,10 +203,8 @@ var __webpack_modules__ = {
204
203
  }
205
204
  pos += octalStr.length - 1;
206
205
  const next = input.charCodeAt(pos);
207
- if ("0" !== octalStr || 56 === next || 57 === next) {
208
- if (inTemplate) return res(null);
209
- errors.strictNumericEscape(startPos, lineStart, curLine);
210
- }
206
+ if ("0" !== octalStr || 56 === next || 57 === next) if (inTemplate) return res(null);
207
+ else errors.strictNumericEscape(startPos, lineStart, curLine);
211
208
  return res(String.fromCharCode(octal));
212
209
  }
213
210
  return res(String.fromCharCode(ch));
@@ -217,10 +214,8 @@ var __webpack_modules__ = {
217
214
  const initialPos = pos;
218
215
  let n;
219
216
  ({ n, pos } = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
220
- if (null === n) {
221
- if (throwOnInvalid) errors.invalidEscapeSequence(initialPos, lineStart, curLine);
222
- else pos = initialPos - 1;
223
- }
217
+ if (null === n) if (throwOnInvalid) errors.invalidEscapeSequence(initialPos, lineStart, curLine);
218
+ else pos = initialPos - 1;
224
219
  return {
225
220
  code: n,
226
221
  pos
@@ -257,17 +252,15 @@ var __webpack_modules__ = {
257
252
  continue;
258
253
  }
259
254
  val = code >= 97 ? code - 97 + 10 : code >= 65 ? code - 65 + 10 : _isDigit(code) ? code - 48 : 1 / 0;
260
- if (val >= radix) {
261
- if (val <= 9 && bailOnError) return {
262
- n: null,
263
- pos
264
- };
265
- if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) val = 0;
266
- else if (forceLen) {
267
- val = 0;
268
- invalid = true;
269
- } else break;
270
- }
255
+ if (val >= radix) if (val <= 9 && bailOnError) return {
256
+ n: null,
257
+ pos
258
+ };
259
+ else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) val = 0;
260
+ else if (forceLen) {
261
+ val = 0;
262
+ invalid = true;
263
+ } else break;
271
264
  ++pos;
272
265
  total = total * radix + val;
273
266
  }
@@ -287,13 +280,11 @@ var __webpack_modules__ = {
287
280
  ++pos;
288
281
  ({ code, pos } = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
289
282
  ++pos;
290
- if (null !== code && code > 0x10ffff) {
291
- if (!throwOnInvalid) return {
292
- code: null,
293
- pos
294
- };
295
- errors.invalidCodePoint(pos, lineStart, curLine);
296
- }
283
+ if (null !== code && code > 0x10ffff) if (!throwOnInvalid) return {
284
+ code: null,
285
+ pos
286
+ };
287
+ else errors.invalidCodePoint(pos, lineStart, curLine);
297
288
  } else ({ code, pos } = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
298
289
  return {
299
290
  code,
@@ -7199,15 +7190,11 @@ var __webpack_modules__ = {
7199
7190
  if (hasOwn(node, "typeAnnotation")) newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc, commentsCache) : node.typeAnnotation;
7200
7191
  if (hasOwn(node, "decorators")) newNode.decorators = deep ? cloneIfNodeOrArray(node.decorators, true, withoutLoc, commentsCache) : node.decorators;
7201
7192
  } else if (hasOwn(_index.NODE_FIELDS, type)) {
7202
- for (const field of Object.keys(_index.NODE_FIELDS[type]))if (hasOwn(node, field)) {
7203
- if (deep) newNode[field] = (0, _index2.isFile)(node) && "comments" === field ? maybeCloneComments(node.comments, deep, withoutLoc, commentsCache) : cloneIfNodeOrArray(node[field], true, withoutLoc, commentsCache);
7204
- else newNode[field] = node[field];
7205
- }
7193
+ for (const field of Object.keys(_index.NODE_FIELDS[type]))if (hasOwn(node, field)) if (deep) newNode[field] = (0, _index2.isFile)(node) && "comments" === field ? maybeCloneComments(node.comments, deep, withoutLoc, commentsCache) : cloneIfNodeOrArray(node[field], true, withoutLoc, commentsCache);
7194
+ else newNode[field] = node[field];
7206
7195
  } else throw new Error(`Unknown node type: "${type}"`);
7207
- if (hasOwn(node, "loc")) {
7208
- if (withoutLoc) newNode.loc = null;
7209
- else newNode.loc = node.loc;
7210
- }
7196
+ if (hasOwn(node, "loc")) if (withoutLoc) newNode.loc = null;
7197
+ else newNode.loc = node.loc;
7211
7198
  if (hasOwn(node, "leadingComments")) newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc, commentsCache);
7212
7199
  if (hasOwn(node, "innerComments")) newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc, commentsCache);
7213
7200
  if (hasOwn(node, "trailingComments")) newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc, commentsCache);
@@ -7264,10 +7251,9 @@ var __webpack_modules__ = {
7264
7251
  function addComments(node, type, comments) {
7265
7252
  if (!comments || !node) return node;
7266
7253
  const key = `${type}Comments`;
7267
- if (node[key]) {
7268
- if ("leading" === type) node[key] = comments.concat(node[key]);
7269
- else node[key].push(...comments);
7270
- } else node[key] = comments;
7254
+ if (node[key]) if ("leading" === type) node[key] = comments.concat(node[key]);
7255
+ else node[key].push(...comments);
7256
+ else node[key] = comments;
7271
7257
  return node;
7272
7258
  }
7273
7259
  },
@@ -7692,10 +7678,8 @@ var __webpack_modules__ = {
7692
7678
  newType = "FunctionDeclaration";
7693
7679
  } else if ((0, _index.isAssignmentExpression)(node)) return (0, _index2.expressionStatement)(node);
7694
7680
  if (mustHaveId && !node.id) newType = false;
7695
- if (!newType) {
7696
- if (ignore) return false;
7697
- throw new Error(`cannot turn ${node.type} to a statement`);
7698
- }
7681
+ if (!newType) if (ignore) return false;
7682
+ else throw new Error(`cannot turn ${node.type} to a statement`);
7699
7683
  node.type = newType;
7700
7684
  return node;
7701
7685
  }
@@ -12321,10 +12305,7 @@ var __webpack_modules__ = {
12321
12305
  }
12322
12306
  function assertNodeType(...types) {
12323
12307
  function validate(node, key, val) {
12324
- for (const type of types)if ((0, _is.default)(type, val)) {
12325
- (0, _validate.validateChild)(node, key, val);
12326
- return;
12327
- }
12308
+ for (const type of types)if ((0, _is.default)(type, val)) return void (0, _validate.validateChild)(node, key, val);
12328
12309
  throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(null == val ? void 0 : val.type)}`);
12329
12310
  }
12330
12311
  validate.oneOfNodeTypes = types;
@@ -12332,10 +12313,7 @@ var __webpack_modules__ = {
12332
12313
  }
12333
12314
  function assertNodeOrValueType(...types) {
12334
12315
  function validate(node, key, val) {
12335
- for (const type of types)if (getType(val) === type || (0, _is.default)(type, val)) {
12336
- (0, _validate.validateChild)(node, key, val);
12337
- return;
12338
- }
12316
+ for (const type of types)if (getType(val) === type || (0, _is.default)(type, val)) return void (0, _validate.validateChild)(node, key, val);
12339
12317
  throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(null == val ? void 0 : val.type)}`);
12340
12318
  }
12341
12319
  validate.oneOfNodeOrValueTypes = types;
@@ -13090,36 +13068,37 @@ var __webpack_modules__ = {
13090
13068
  const types = [];
13091
13069
  for(let i = 0; i < nodes.length; i++){
13092
13070
  const node = nodes[i];
13093
- if (!!node) {
13094
- if (types.includes(node)) continue;
13095
- if ((0, _index.isAnyTypeAnnotation)(node)) return [
13096
- node
13097
- ];
13098
- if ((0, _index.isFlowBaseAnnotation)(node)) {
13099
- bases.set(node.type, node);
13100
- continue;
13101
- }
13102
- if ((0, _index.isUnionTypeAnnotation)(node)) {
13103
- if (!typeGroups.has(node.types)) {
13104
- nodes.push(...node.types);
13105
- typeGroups.add(node.types);
13071
+ if (node) {
13072
+ if (!types.includes(node)) {
13073
+ if ((0, _index.isAnyTypeAnnotation)(node)) return [
13074
+ node
13075
+ ];
13076
+ if ((0, _index.isFlowBaseAnnotation)(node)) {
13077
+ bases.set(node.type, node);
13078
+ continue;
13106
13079
  }
13107
- continue;
13108
- }
13109
- if ((0, _index.isGenericTypeAnnotation)(node)) {
13110
- const name = getQualifiedName(node.id);
13111
- if (generics.has(name)) {
13112
- let existing = generics.get(name);
13113
- if (existing.typeParameters) {
13114
- if (node.typeParameters) {
13115
- existing.typeParameters.params.push(...node.typeParameters.params);
13116
- existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params);
13117
- }
13118
- } else existing = node.typeParameters;
13119
- } else generics.set(name, node);
13120
- continue;
13080
+ if ((0, _index.isUnionTypeAnnotation)(node)) {
13081
+ if (!typeGroups.has(node.types)) {
13082
+ nodes.push(...node.types);
13083
+ typeGroups.add(node.types);
13084
+ }
13085
+ continue;
13086
+ }
13087
+ if ((0, _index.isGenericTypeAnnotation)(node)) {
13088
+ const name = getQualifiedName(node.id);
13089
+ if (generics.has(name)) {
13090
+ let existing = generics.get(name);
13091
+ if (existing.typeParameters) {
13092
+ if (node.typeParameters) {
13093
+ existing.typeParameters.params.push(...node.typeParameters.params);
13094
+ existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params);
13095
+ }
13096
+ } else existing = node.typeParameters;
13097
+ } else generics.set(name, node);
13098
+ continue;
13099
+ }
13100
+ types.push(node);
13121
13101
  }
13122
- types.push(node);
13123
13102
  }
13124
13103
  }
13125
13104
  for (const [, baseType] of bases)types.push(baseType);
@@ -13212,36 +13191,37 @@ var __webpack_modules__ = {
13212
13191
  const types = [];
13213
13192
  for(let i = 0; i < nodes.length; i++){
13214
13193
  const node = nodes[i];
13215
- if (!!node) {
13216
- if (types.includes(node)) continue;
13217
- if ((0, _index.isTSAnyKeyword)(node)) return [
13218
- node
13219
- ];
13220
- if ((0, _index.isTSBaseType)(node)) {
13221
- bases.set(node.type, node);
13222
- continue;
13223
- }
13224
- if ((0, _index.isTSUnionType)(node)) {
13225
- if (!typeGroups.has(node.types)) {
13226
- nodes.push(...node.types);
13227
- typeGroups.add(node.types);
13194
+ if (node) {
13195
+ if (!types.includes(node)) {
13196
+ if ((0, _index.isTSAnyKeyword)(node)) return [
13197
+ node
13198
+ ];
13199
+ if ((0, _index.isTSBaseType)(node)) {
13200
+ bases.set(node.type, node);
13201
+ continue;
13228
13202
  }
13229
- continue;
13230
- }
13231
- if ((0, _index.isTSTypeReference)(node) && node.typeParameters) {
13232
- const name = getQualifiedName(node.typeName);
13233
- if (generics.has(name)) {
13234
- let existing = generics.get(name);
13235
- if (existing.typeParameters) {
13236
- if (node.typeParameters) {
13237
- existing.typeParameters.params.push(...node.typeParameters.params);
13238
- existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params);
13239
- }
13240
- } else existing = node.typeParameters;
13241
- } else generics.set(name, node);
13242
- continue;
13203
+ if ((0, _index.isTSUnionType)(node)) {
13204
+ if (!typeGroups.has(node.types)) {
13205
+ nodes.push(...node.types);
13206
+ typeGroups.add(node.types);
13207
+ }
13208
+ continue;
13209
+ }
13210
+ if ((0, _index.isTSTypeReference)(node) && node.typeParameters) {
13211
+ const name = getQualifiedName(node.typeName);
13212
+ if (generics.has(name)) {
13213
+ let existing = generics.get(name);
13214
+ if (existing.typeParameters) {
13215
+ if (node.typeParameters) {
13216
+ existing.typeParameters.params.push(...node.typeParameters.params);
13217
+ existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params);
13218
+ }
13219
+ } else existing = node.typeParameters;
13220
+ } else generics.set(name, node);
13221
+ continue;
13222
+ }
13223
+ types.push(node);
13243
13224
  }
13244
- types.push(node);
13245
13225
  }
13246
13226
  }
13247
13227
  for (const [, baseType] of bases)types.push(baseType);
@@ -13328,10 +13308,8 @@ var __webpack_modules__ = {
13328
13308
  if (keys) for(let i = 0; i < keys.length; i++){
13329
13309
  const key = keys[i];
13330
13310
  const nodes = id[key];
13331
- if (nodes) {
13332
- if (Array.isArray(nodes)) search.push(...nodes);
13333
- else search.push(nodes);
13334
- }
13311
+ if (nodes) if (Array.isArray(nodes)) search.push(...nodes);
13312
+ else search.push(nodes);
13335
13313
  }
13336
13314
  }
13337
13315
  return ids;
@@ -13537,7 +13515,7 @@ var __webpack_modules__ = {
13537
13515
  const subNode = node[key];
13538
13516
  if (Array.isArray(subNode)) for(let i = 0; i < subNode.length; i++){
13539
13517
  const child = subNode[i];
13540
- if (!!child) {
13518
+ if (child) {
13541
13519
  ancestors.push({
13542
13520
  node,
13543
13521
  key,
@@ -16905,16 +16883,16 @@ class UUID {
16905
16883
  let hex;
16906
16884
  switch(uuid.length){
16907
16885
  case 32:
16908
- hex = null === (_a = /^[0-9a-f]{32}$/i.exec(uuid)) || void 0 === _a ? void 0 : _a[0];
16886
+ hex = null == (_a = /^[0-9a-f]{32}$/i.exec(uuid)) ? void 0 : _a[0];
16909
16887
  break;
16910
16888
  case 36:
16911
- hex = null === (_b = /^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(uuid)) || void 0 === _b ? void 0 : _b.slice(1, 6).join("");
16889
+ hex = null == (_b = /^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(uuid)) ? void 0 : _b.slice(1, 6).join("");
16912
16890
  break;
16913
16891
  case 38:
16914
- hex = null === (_c = /^\{([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})\}$/i.exec(uuid)) || void 0 === _c ? void 0 : _c.slice(1, 6).join("");
16892
+ hex = null == (_c = /^\{([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})\}$/i.exec(uuid)) ? void 0 : _c.slice(1, 6).join("");
16915
16893
  break;
16916
16894
  case 45:
16917
- hex = null === (_d = /^urn:uuid:([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(uuid)) || void 0 === _d ? void 0 : _d.slice(1, 6).join("");
16895
+ hex = null == (_d = /^urn:uuid:([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(uuid)) ? void 0 : _d.slice(1, 6).join("");
16918
16896
  break;
16919
16897
  default:
16920
16898
  break;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hot-updater",
3
3
  "type": "module",
4
- "version": "0.16.2",
4
+ "version": "0.16.4",
5
5
  "bin": {
6
6
  "hot-updater": "./dist/index.js"
7
7
  },
@@ -49,9 +49,9 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@clack/prompts": "^0.10.0",
52
- "@hot-updater/console": "0.16.2",
53
- "@hot-updater/core": "0.16.2",
54
- "@hot-updater/plugin-core": "0.16.2",
52
+ "@hot-updater/console": "0.16.4",
53
+ "@hot-updater/core": "0.16.4",
54
+ "@hot-updater/plugin-core": "0.16.4",
55
55
  "commander": "^11.1.0",
56
56
  "cosmiconfig": "^9.0.0",
57
57
  "cosmiconfig-typescript-loader": "^5.0.0",
@@ -86,6 +86,7 @@
86
86
  "peerDependencies": {
87
87
  "@hot-updater/aws": "*",
88
88
  "@hot-updater/cloudflare": "*",
89
+ "@hot-updater/firebase": "*",
89
90
  "@hot-updater/supabase": "*"
90
91
  },
91
92
  "peerDependenciesMeta": {
@@ -97,6 +98,9 @@
97
98
  },
98
99
  "@hot-updater/aws": {
99
100
  "optional": true
101
+ },
102
+ "@hot-updater/firebase": {
103
+ "optional": true
100
104
  }
101
105
  },
102
106
  "scripts": {