@shopify/cli-hydrogen 2.0.2 → 2.0.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/CHANGELOG.md +24 -0
- package/dist/{Command-a46acef0.js → Command-e4356683.js} +17 -362
- package/dist/Command-e4356683.js.map +1 -0
- package/dist/commands/hydrogen/build.js +3 -1
- package/dist/commands/hydrogen/build.js.map +1 -1
- package/dist/commands/hydrogen/check.js +2 -1
- package/dist/commands/hydrogen/check.js.map +1 -1
- package/dist/commands/hydrogen/dev.js +7 -2
- package/dist/commands/hydrogen/dev.js.map +1 -1
- package/dist/commands/hydrogen/init.js +6 -5
- package/dist/commands/hydrogen/init.js.map +1 -1
- package/package.json +2 -2
- package/dist/Command-a46acef0.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @shopify/cli-hydrogen
|
|
2
2
|
|
|
3
|
+
## 2.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [56b31022]
|
|
8
|
+
- @shopify/cli-kit@2.0.5
|
|
9
|
+
|
|
10
|
+
## 2.0.4
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 39d7ebd8: Added friendlier template names and adds overwrite prompt to init command if the directory is not empty.
|
|
15
|
+
- ee9adca9: Add `--host` flag to `shopify hydrogen dev`
|
|
16
|
+
|
|
17
|
+
## 2.0.3
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [30daa213]
|
|
22
|
+
- Updated dependencies [07bcb005]
|
|
23
|
+
- Updated dependencies [ba003f7b]
|
|
24
|
+
- Updated dependencies [b00ac480]
|
|
25
|
+
- @shopify/cli-kit@2.0.3
|
|
26
|
+
|
|
3
27
|
## 2.0.2
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -10,6 +10,7 @@ import { path as path$t, output } from '@shopify/cli-kit';
|
|
|
10
10
|
import require$$0$2 from 'tty';
|
|
11
11
|
import require$$1$1 from 'readline';
|
|
12
12
|
import require$$0$b from 'buffer';
|
|
13
|
+
import require$$10 from 'string_decoder/';
|
|
13
14
|
import require$$1$3 from 'child_process';
|
|
14
15
|
import require$$1$2 from 'string_decoder';
|
|
15
16
|
import require$$2$1 from 'crypto';
|
|
@@ -21,7 +22,7 @@ import 'prettier';
|
|
|
21
22
|
import { Command as Command$1 } from '@oclif/core';
|
|
22
23
|
|
|
23
24
|
var name = "@shopify/cli-hydrogen";
|
|
24
|
-
var version$1 = "2.0.
|
|
25
|
+
var version$1 = "2.0.5";
|
|
25
26
|
var description$1 = "Commands for building Hydrogen storefronts";
|
|
26
27
|
var type$2 = "module";
|
|
27
28
|
var files = [
|
|
@@ -60,7 +61,7 @@ var dependencies$1 = {
|
|
|
60
61
|
vite: "^2.9.6"
|
|
61
62
|
};
|
|
62
63
|
var peerDependencies = {
|
|
63
|
-
"@shopify/cli-kit": "2.0.
|
|
64
|
+
"@shopify/cli-kit": "2.0.5"
|
|
64
65
|
};
|
|
65
66
|
var devDependencies = {
|
|
66
67
|
"@babel/core": "^7.17.10",
|
|
@@ -13498,7 +13499,7 @@ class Package {
|
|
|
13498
13499
|
async nodeVersion() {
|
|
13499
13500
|
return this.internal.engines?.node;
|
|
13500
13501
|
}
|
|
13501
|
-
get
|
|
13502
|
+
get dependencyManager() {
|
|
13502
13503
|
return /yarn/.test(process.env.npm_execpath || "") ? "yarn" : "npm";
|
|
13503
13504
|
}
|
|
13504
13505
|
syncInternal(pkgJson) {
|
|
@@ -32105,7 +32106,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
32105
32106
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
32106
32107
|
|
|
32107
32108
|
var _require$2 = require$$0$b,
|
|
32108
|
-
Buffer$
|
|
32109
|
+
Buffer$c = _require$2.Buffer;
|
|
32109
32110
|
|
|
32110
32111
|
var _require2 = require$$0$3,
|
|
32111
32112
|
inspect = _require2.inspect;
|
|
@@ -32113,7 +32114,7 @@ var _require2 = require$$0$3,
|
|
|
32113
32114
|
var custom = inspect && inspect.custom || 'inspect';
|
|
32114
32115
|
|
|
32115
32116
|
function copyBuffer(src, target, offset) {
|
|
32116
|
-
Buffer$
|
|
32117
|
+
Buffer$c.prototype.copy.call(src, target, offset);
|
|
32117
32118
|
}
|
|
32118
32119
|
|
|
32119
32120
|
var buffer_list =
|
|
@@ -32180,8 +32181,8 @@ function () {
|
|
|
32180
32181
|
}, {
|
|
32181
32182
|
key: "concat",
|
|
32182
32183
|
value: function concat(n) {
|
|
32183
|
-
if (this.length === 0) return Buffer$
|
|
32184
|
-
var ret = Buffer$
|
|
32184
|
+
if (this.length === 0) return Buffer$c.alloc(0);
|
|
32185
|
+
var ret = Buffer$c.allocUnsafe(n >>> 0);
|
|
32185
32186
|
var p = this.head;
|
|
32186
32187
|
var i = 0;
|
|
32187
32188
|
|
|
@@ -32255,7 +32256,7 @@ function () {
|
|
|
32255
32256
|
}, {
|
|
32256
32257
|
key: "_getBuffer",
|
|
32257
32258
|
value: function _getBuffer(n) {
|
|
32258
|
-
var ret = Buffer$
|
|
32259
|
+
var ret = Buffer$c.allocUnsafe(n);
|
|
32259
32260
|
var p = this.head;
|
|
32260
32261
|
var c = 1;
|
|
32261
32262
|
p.data.copy(ret);
|
|
@@ -32632,16 +32633,16 @@ var Stream$1 = stream;
|
|
|
32632
32633
|
/*</replacement>*/
|
|
32633
32634
|
|
|
32634
32635
|
|
|
32635
|
-
var Buffer$
|
|
32636
|
+
var Buffer$b = require$$0$b.Buffer;
|
|
32636
32637
|
|
|
32637
32638
|
var OurUint8Array$1 = commonjsGlobal.Uint8Array || function () {};
|
|
32638
32639
|
|
|
32639
32640
|
function _uint8ArrayToBuffer$1(chunk) {
|
|
32640
|
-
return Buffer$
|
|
32641
|
+
return Buffer$b.from(chunk);
|
|
32641
32642
|
}
|
|
32642
32643
|
|
|
32643
32644
|
function _isUint8Array$1(obj) {
|
|
32644
|
-
return Buffer$
|
|
32645
|
+
return Buffer$b.isBuffer(obj) || obj instanceof OurUint8Array$1;
|
|
32645
32646
|
}
|
|
32646
32647
|
|
|
32647
32648
|
var destroyImpl$1 = destroy_1;
|
|
@@ -32856,7 +32857,7 @@ Writable$1.prototype.write = function (chunk, encoding, cb) {
|
|
|
32856
32857
|
|
|
32857
32858
|
var isBuf = !state.objectMode && _isUint8Array$1(chunk);
|
|
32858
32859
|
|
|
32859
|
-
if (isBuf && !Buffer$
|
|
32860
|
+
if (isBuf && !Buffer$b.isBuffer(chunk)) {
|
|
32860
32861
|
chunk = _uint8ArrayToBuffer$1(chunk);
|
|
32861
32862
|
}
|
|
32862
32863
|
|
|
@@ -32907,7 +32908,7 @@ Object.defineProperty(Writable$1.prototype, 'writableBuffer', {
|
|
|
32907
32908
|
|
|
32908
32909
|
function decodeChunk(state, chunk, encoding) {
|
|
32909
32910
|
if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
|
|
32910
|
-
chunk = Buffer$
|
|
32911
|
+
chunk = Buffer$b.from(chunk, encoding);
|
|
32911
32912
|
}
|
|
32912
32913
|
|
|
32913
32914
|
return chunk;
|
|
@@ -33376,352 +33377,6 @@ Object.defineProperty(Duplex$2.prototype, 'destroyed', {
|
|
|
33376
33377
|
}
|
|
33377
33378
|
});
|
|
33378
33379
|
|
|
33379
|
-
var string_decoder = {};
|
|
33380
|
-
|
|
33381
|
-
var safeBuffer = {exports: {}};
|
|
33382
|
-
|
|
33383
|
-
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
33384
|
-
|
|
33385
|
-
(function (module, exports) {
|
|
33386
|
-
/* eslint-disable node/no-deprecated-api */
|
|
33387
|
-
var buffer = require$$0$b;
|
|
33388
|
-
var Buffer = buffer.Buffer;
|
|
33389
|
-
|
|
33390
|
-
// alternative to using Object.keys for old browsers
|
|
33391
|
-
function copyProps (src, dst) {
|
|
33392
|
-
for (var key in src) {
|
|
33393
|
-
dst[key] = src[key];
|
|
33394
|
-
}
|
|
33395
|
-
}
|
|
33396
|
-
if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
|
|
33397
|
-
module.exports = buffer;
|
|
33398
|
-
} else {
|
|
33399
|
-
// Copy properties from require('buffer')
|
|
33400
|
-
copyProps(buffer, exports);
|
|
33401
|
-
exports.Buffer = SafeBuffer;
|
|
33402
|
-
}
|
|
33403
|
-
|
|
33404
|
-
function SafeBuffer (arg, encodingOrOffset, length) {
|
|
33405
|
-
return Buffer(arg, encodingOrOffset, length)
|
|
33406
|
-
}
|
|
33407
|
-
|
|
33408
|
-
SafeBuffer.prototype = Object.create(Buffer.prototype);
|
|
33409
|
-
|
|
33410
|
-
// Copy static methods from Buffer
|
|
33411
|
-
copyProps(Buffer, SafeBuffer);
|
|
33412
|
-
|
|
33413
|
-
SafeBuffer.from = function (arg, encodingOrOffset, length) {
|
|
33414
|
-
if (typeof arg === 'number') {
|
|
33415
|
-
throw new TypeError('Argument must not be a number')
|
|
33416
|
-
}
|
|
33417
|
-
return Buffer(arg, encodingOrOffset, length)
|
|
33418
|
-
};
|
|
33419
|
-
|
|
33420
|
-
SafeBuffer.alloc = function (size, fill, encoding) {
|
|
33421
|
-
if (typeof size !== 'number') {
|
|
33422
|
-
throw new TypeError('Argument must be a number')
|
|
33423
|
-
}
|
|
33424
|
-
var buf = Buffer(size);
|
|
33425
|
-
if (fill !== undefined) {
|
|
33426
|
-
if (typeof encoding === 'string') {
|
|
33427
|
-
buf.fill(fill, encoding);
|
|
33428
|
-
} else {
|
|
33429
|
-
buf.fill(fill);
|
|
33430
|
-
}
|
|
33431
|
-
} else {
|
|
33432
|
-
buf.fill(0);
|
|
33433
|
-
}
|
|
33434
|
-
return buf
|
|
33435
|
-
};
|
|
33436
|
-
|
|
33437
|
-
SafeBuffer.allocUnsafe = function (size) {
|
|
33438
|
-
if (typeof size !== 'number') {
|
|
33439
|
-
throw new TypeError('Argument must be a number')
|
|
33440
|
-
}
|
|
33441
|
-
return Buffer(size)
|
|
33442
|
-
};
|
|
33443
|
-
|
|
33444
|
-
SafeBuffer.allocUnsafeSlow = function (size) {
|
|
33445
|
-
if (typeof size !== 'number') {
|
|
33446
|
-
throw new TypeError('Argument must be a number')
|
|
33447
|
-
}
|
|
33448
|
-
return buffer.SlowBuffer(size)
|
|
33449
|
-
};
|
|
33450
|
-
}(safeBuffer, safeBuffer.exports));
|
|
33451
|
-
|
|
33452
|
-
/*<replacement>*/
|
|
33453
|
-
|
|
33454
|
-
var Buffer$b = safeBuffer.exports.Buffer;
|
|
33455
|
-
/*</replacement>*/
|
|
33456
|
-
|
|
33457
|
-
var isEncoding = Buffer$b.isEncoding || function (encoding) {
|
|
33458
|
-
encoding = '' + encoding;
|
|
33459
|
-
switch (encoding && encoding.toLowerCase()) {
|
|
33460
|
-
case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
|
|
33461
|
-
return true;
|
|
33462
|
-
default:
|
|
33463
|
-
return false;
|
|
33464
|
-
}
|
|
33465
|
-
};
|
|
33466
|
-
|
|
33467
|
-
function _normalizeEncoding(enc) {
|
|
33468
|
-
if (!enc) return 'utf8';
|
|
33469
|
-
var retried;
|
|
33470
|
-
while (true) {
|
|
33471
|
-
switch (enc) {
|
|
33472
|
-
case 'utf8':
|
|
33473
|
-
case 'utf-8':
|
|
33474
|
-
return 'utf8';
|
|
33475
|
-
case 'ucs2':
|
|
33476
|
-
case 'ucs-2':
|
|
33477
|
-
case 'utf16le':
|
|
33478
|
-
case 'utf-16le':
|
|
33479
|
-
return 'utf16le';
|
|
33480
|
-
case 'latin1':
|
|
33481
|
-
case 'binary':
|
|
33482
|
-
return 'latin1';
|
|
33483
|
-
case 'base64':
|
|
33484
|
-
case 'ascii':
|
|
33485
|
-
case 'hex':
|
|
33486
|
-
return enc;
|
|
33487
|
-
default:
|
|
33488
|
-
if (retried) return; // undefined
|
|
33489
|
-
enc = ('' + enc).toLowerCase();
|
|
33490
|
-
retried = true;
|
|
33491
|
-
}
|
|
33492
|
-
}
|
|
33493
|
-
}
|
|
33494
|
-
// Do not cache `Buffer.isEncoding` when checking encoding names as some
|
|
33495
|
-
// modules monkey-patch it to support additional encodings
|
|
33496
|
-
function normalizeEncoding(enc) {
|
|
33497
|
-
var nenc = _normalizeEncoding(enc);
|
|
33498
|
-
if (typeof nenc !== 'string' && (Buffer$b.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
|
|
33499
|
-
return nenc || enc;
|
|
33500
|
-
}
|
|
33501
|
-
|
|
33502
|
-
// StringDecoder provides an interface for efficiently splitting a series of
|
|
33503
|
-
// buffers into a series of JS strings without breaking apart multi-byte
|
|
33504
|
-
// characters.
|
|
33505
|
-
string_decoder.StringDecoder = StringDecoder$2;
|
|
33506
|
-
function StringDecoder$2(encoding) {
|
|
33507
|
-
this.encoding = normalizeEncoding(encoding);
|
|
33508
|
-
var nb;
|
|
33509
|
-
switch (this.encoding) {
|
|
33510
|
-
case 'utf16le':
|
|
33511
|
-
this.text = utf16Text;
|
|
33512
|
-
this.end = utf16End;
|
|
33513
|
-
nb = 4;
|
|
33514
|
-
break;
|
|
33515
|
-
case 'utf8':
|
|
33516
|
-
this.fillLast = utf8FillLast;
|
|
33517
|
-
nb = 4;
|
|
33518
|
-
break;
|
|
33519
|
-
case 'base64':
|
|
33520
|
-
this.text = base64Text;
|
|
33521
|
-
this.end = base64End;
|
|
33522
|
-
nb = 3;
|
|
33523
|
-
break;
|
|
33524
|
-
default:
|
|
33525
|
-
this.write = simpleWrite;
|
|
33526
|
-
this.end = simpleEnd;
|
|
33527
|
-
return;
|
|
33528
|
-
}
|
|
33529
|
-
this.lastNeed = 0;
|
|
33530
|
-
this.lastTotal = 0;
|
|
33531
|
-
this.lastChar = Buffer$b.allocUnsafe(nb);
|
|
33532
|
-
}
|
|
33533
|
-
|
|
33534
|
-
StringDecoder$2.prototype.write = function (buf) {
|
|
33535
|
-
if (buf.length === 0) return '';
|
|
33536
|
-
var r;
|
|
33537
|
-
var i;
|
|
33538
|
-
if (this.lastNeed) {
|
|
33539
|
-
r = this.fillLast(buf);
|
|
33540
|
-
if (r === undefined) return '';
|
|
33541
|
-
i = this.lastNeed;
|
|
33542
|
-
this.lastNeed = 0;
|
|
33543
|
-
} else {
|
|
33544
|
-
i = 0;
|
|
33545
|
-
}
|
|
33546
|
-
if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
|
|
33547
|
-
return r || '';
|
|
33548
|
-
};
|
|
33549
|
-
|
|
33550
|
-
StringDecoder$2.prototype.end = utf8End;
|
|
33551
|
-
|
|
33552
|
-
// Returns only complete characters in a Buffer
|
|
33553
|
-
StringDecoder$2.prototype.text = utf8Text;
|
|
33554
|
-
|
|
33555
|
-
// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
|
|
33556
|
-
StringDecoder$2.prototype.fillLast = function (buf) {
|
|
33557
|
-
if (this.lastNeed <= buf.length) {
|
|
33558
|
-
buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
|
|
33559
|
-
return this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
33560
|
-
}
|
|
33561
|
-
buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
|
|
33562
|
-
this.lastNeed -= buf.length;
|
|
33563
|
-
};
|
|
33564
|
-
|
|
33565
|
-
// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
|
|
33566
|
-
// continuation byte. If an invalid byte is detected, -2 is returned.
|
|
33567
|
-
function utf8CheckByte(byte) {
|
|
33568
|
-
if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
|
|
33569
|
-
return byte >> 6 === 0x02 ? -1 : -2;
|
|
33570
|
-
}
|
|
33571
|
-
|
|
33572
|
-
// Checks at most 3 bytes at the end of a Buffer in order to detect an
|
|
33573
|
-
// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
|
|
33574
|
-
// needed to complete the UTF-8 character (if applicable) are returned.
|
|
33575
|
-
function utf8CheckIncomplete(self, buf, i) {
|
|
33576
|
-
var j = buf.length - 1;
|
|
33577
|
-
if (j < i) return 0;
|
|
33578
|
-
var nb = utf8CheckByte(buf[j]);
|
|
33579
|
-
if (nb >= 0) {
|
|
33580
|
-
if (nb > 0) self.lastNeed = nb - 1;
|
|
33581
|
-
return nb;
|
|
33582
|
-
}
|
|
33583
|
-
if (--j < i || nb === -2) return 0;
|
|
33584
|
-
nb = utf8CheckByte(buf[j]);
|
|
33585
|
-
if (nb >= 0) {
|
|
33586
|
-
if (nb > 0) self.lastNeed = nb - 2;
|
|
33587
|
-
return nb;
|
|
33588
|
-
}
|
|
33589
|
-
if (--j < i || nb === -2) return 0;
|
|
33590
|
-
nb = utf8CheckByte(buf[j]);
|
|
33591
|
-
if (nb >= 0) {
|
|
33592
|
-
if (nb > 0) {
|
|
33593
|
-
if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
|
|
33594
|
-
}
|
|
33595
|
-
return nb;
|
|
33596
|
-
}
|
|
33597
|
-
return 0;
|
|
33598
|
-
}
|
|
33599
|
-
|
|
33600
|
-
// Validates as many continuation bytes for a multi-byte UTF-8 character as
|
|
33601
|
-
// needed or are available. If we see a non-continuation byte where we expect
|
|
33602
|
-
// one, we "replace" the validated continuation bytes we've seen so far with
|
|
33603
|
-
// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
|
|
33604
|
-
// behavior. The continuation byte check is included three times in the case
|
|
33605
|
-
// where all of the continuation bytes for a character exist in the same buffer.
|
|
33606
|
-
// It is also done this way as a slight performance increase instead of using a
|
|
33607
|
-
// loop.
|
|
33608
|
-
function utf8CheckExtraBytes(self, buf, p) {
|
|
33609
|
-
if ((buf[0] & 0xC0) !== 0x80) {
|
|
33610
|
-
self.lastNeed = 0;
|
|
33611
|
-
return '\ufffd';
|
|
33612
|
-
}
|
|
33613
|
-
if (self.lastNeed > 1 && buf.length > 1) {
|
|
33614
|
-
if ((buf[1] & 0xC0) !== 0x80) {
|
|
33615
|
-
self.lastNeed = 1;
|
|
33616
|
-
return '\ufffd';
|
|
33617
|
-
}
|
|
33618
|
-
if (self.lastNeed > 2 && buf.length > 2) {
|
|
33619
|
-
if ((buf[2] & 0xC0) !== 0x80) {
|
|
33620
|
-
self.lastNeed = 2;
|
|
33621
|
-
return '\ufffd';
|
|
33622
|
-
}
|
|
33623
|
-
}
|
|
33624
|
-
}
|
|
33625
|
-
}
|
|
33626
|
-
|
|
33627
|
-
// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
|
|
33628
|
-
function utf8FillLast(buf) {
|
|
33629
|
-
var p = this.lastTotal - this.lastNeed;
|
|
33630
|
-
var r = utf8CheckExtraBytes(this, buf);
|
|
33631
|
-
if (r !== undefined) return r;
|
|
33632
|
-
if (this.lastNeed <= buf.length) {
|
|
33633
|
-
buf.copy(this.lastChar, p, 0, this.lastNeed);
|
|
33634
|
-
return this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
33635
|
-
}
|
|
33636
|
-
buf.copy(this.lastChar, p, 0, buf.length);
|
|
33637
|
-
this.lastNeed -= buf.length;
|
|
33638
|
-
}
|
|
33639
|
-
|
|
33640
|
-
// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
|
|
33641
|
-
// partial character, the character's bytes are buffered until the required
|
|
33642
|
-
// number of bytes are available.
|
|
33643
|
-
function utf8Text(buf, i) {
|
|
33644
|
-
var total = utf8CheckIncomplete(this, buf, i);
|
|
33645
|
-
if (!this.lastNeed) return buf.toString('utf8', i);
|
|
33646
|
-
this.lastTotal = total;
|
|
33647
|
-
var end = buf.length - (total - this.lastNeed);
|
|
33648
|
-
buf.copy(this.lastChar, 0, end);
|
|
33649
|
-
return buf.toString('utf8', i, end);
|
|
33650
|
-
}
|
|
33651
|
-
|
|
33652
|
-
// For UTF-8, a replacement character is added when ending on a partial
|
|
33653
|
-
// character.
|
|
33654
|
-
function utf8End(buf) {
|
|
33655
|
-
var r = buf && buf.length ? this.write(buf) : '';
|
|
33656
|
-
if (this.lastNeed) return r + '\ufffd';
|
|
33657
|
-
return r;
|
|
33658
|
-
}
|
|
33659
|
-
|
|
33660
|
-
// UTF-16LE typically needs two bytes per character, but even if we have an even
|
|
33661
|
-
// number of bytes available, we need to check if we end on a leading/high
|
|
33662
|
-
// surrogate. In that case, we need to wait for the next two bytes in order to
|
|
33663
|
-
// decode the last character properly.
|
|
33664
|
-
function utf16Text(buf, i) {
|
|
33665
|
-
if ((buf.length - i) % 2 === 0) {
|
|
33666
|
-
var r = buf.toString('utf16le', i);
|
|
33667
|
-
if (r) {
|
|
33668
|
-
var c = r.charCodeAt(r.length - 1);
|
|
33669
|
-
if (c >= 0xD800 && c <= 0xDBFF) {
|
|
33670
|
-
this.lastNeed = 2;
|
|
33671
|
-
this.lastTotal = 4;
|
|
33672
|
-
this.lastChar[0] = buf[buf.length - 2];
|
|
33673
|
-
this.lastChar[1] = buf[buf.length - 1];
|
|
33674
|
-
return r.slice(0, -1);
|
|
33675
|
-
}
|
|
33676
|
-
}
|
|
33677
|
-
return r;
|
|
33678
|
-
}
|
|
33679
|
-
this.lastNeed = 1;
|
|
33680
|
-
this.lastTotal = 2;
|
|
33681
|
-
this.lastChar[0] = buf[buf.length - 1];
|
|
33682
|
-
return buf.toString('utf16le', i, buf.length - 1);
|
|
33683
|
-
}
|
|
33684
|
-
|
|
33685
|
-
// For UTF-16LE we do not explicitly append special replacement characters if we
|
|
33686
|
-
// end on a partial character, we simply let v8 handle that.
|
|
33687
|
-
function utf16End(buf) {
|
|
33688
|
-
var r = buf && buf.length ? this.write(buf) : '';
|
|
33689
|
-
if (this.lastNeed) {
|
|
33690
|
-
var end = this.lastTotal - this.lastNeed;
|
|
33691
|
-
return r + this.lastChar.toString('utf16le', 0, end);
|
|
33692
|
-
}
|
|
33693
|
-
return r;
|
|
33694
|
-
}
|
|
33695
|
-
|
|
33696
|
-
function base64Text(buf, i) {
|
|
33697
|
-
var n = (buf.length - i) % 3;
|
|
33698
|
-
if (n === 0) return buf.toString('base64', i);
|
|
33699
|
-
this.lastNeed = 3 - n;
|
|
33700
|
-
this.lastTotal = 3;
|
|
33701
|
-
if (n === 1) {
|
|
33702
|
-
this.lastChar[0] = buf[buf.length - 1];
|
|
33703
|
-
} else {
|
|
33704
|
-
this.lastChar[0] = buf[buf.length - 2];
|
|
33705
|
-
this.lastChar[1] = buf[buf.length - 1];
|
|
33706
|
-
}
|
|
33707
|
-
return buf.toString('base64', i, buf.length - n);
|
|
33708
|
-
}
|
|
33709
|
-
|
|
33710
|
-
function base64End(buf) {
|
|
33711
|
-
var r = buf && buf.length ? this.write(buf) : '';
|
|
33712
|
-
if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
|
|
33713
|
-
return r;
|
|
33714
|
-
}
|
|
33715
|
-
|
|
33716
|
-
// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
|
|
33717
|
-
function simpleWrite(buf) {
|
|
33718
|
-
return buf.toString(this.encoding);
|
|
33719
|
-
}
|
|
33720
|
-
|
|
33721
|
-
function simpleEnd(buf) {
|
|
33722
|
-
return buf && buf.length ? this.write(buf) : '';
|
|
33723
|
-
}
|
|
33724
|
-
|
|
33725
33380
|
var ERR_STREAM_PREMATURE_CLOSE = errors$1.codes.ERR_STREAM_PREMATURE_CLOSE;
|
|
33726
33381
|
|
|
33727
33382
|
function once$1(callback) {
|
|
@@ -34232,7 +33887,7 @@ function ReadableState(options, stream, isDuplex) {
|
|
|
34232
33887
|
this.encoding = null;
|
|
34233
33888
|
|
|
34234
33889
|
if (options.encoding) {
|
|
34235
|
-
if (!StringDecoder$1) StringDecoder$1 =
|
|
33890
|
+
if (!StringDecoder$1) StringDecoder$1 = require$$10.StringDecoder;
|
|
34236
33891
|
this.decoder = new StringDecoder$1(options.encoding);
|
|
34237
33892
|
this.encoding = options.encoding;
|
|
34238
33893
|
}
|
|
@@ -34394,7 +34049,7 @@ Readable.prototype.isPaused = function () {
|
|
|
34394
34049
|
|
|
34395
34050
|
|
|
34396
34051
|
Readable.prototype.setEncoding = function (enc) {
|
|
34397
|
-
if (!StringDecoder$1) StringDecoder$1 =
|
|
34052
|
+
if (!StringDecoder$1) StringDecoder$1 = require$$10.StringDecoder;
|
|
34398
34053
|
var decoder = new StringDecoder$1(enc);
|
|
34399
34054
|
this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8
|
|
34400
34055
|
|
|
@@ -63673,4 +63328,4 @@ class Command extends Command$1 {
|
|
|
63673
63328
|
}
|
|
63674
63329
|
|
|
63675
63330
|
export { Command as C, HelpfulError as H, source$1 as a, commonjsGlobal as b, cliHydrogenPackageJson as c, commonjsRequire as d, semver as s };
|
|
63676
|
-
//# sourceMappingURL=Command-
|
|
63331
|
+
//# sourceMappingURL=Command-e4356683.js.map
|