@lynx-js/qrcode-rsbuild-plugin 0.3.6 → 0.4.0
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 +6 -0
- package/dist/204.js +2 -2
- package/dist/441.js +1910 -0
- package/dist/640.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +18 -9
- package/dist/shortcuts.js +18 -9
- package/package.json +5 -5
- package/dist/167.js +0 -1483
package/dist/640.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export interface PluginQRCodeOptions {
|
|
|
22
22
|
* @example
|
|
23
23
|
*
|
|
24
24
|
* ```js
|
|
25
|
-
* import { pluginQRCode } from '@lynx-js/plugin
|
|
25
|
+
* import { pluginQRCode } from '@lynx-js/qrcode-rsbuild-plugin'
|
|
26
26
|
* import { defineConfig } from '@lynx-js/rspeedy'
|
|
27
27
|
*
|
|
28
28
|
* export default defineConfig({
|
|
@@ -43,7 +43,7 @@ export interface PluginQRCodeOptions {
|
|
|
43
43
|
* You may press `a` in the terminal to switch between schemas.
|
|
44
44
|
*
|
|
45
45
|
* ```js
|
|
46
|
-
* import { pluginQRCode } from '@lynx-js/plugin
|
|
46
|
+
* import { pluginQRCode } from '@lynx-js/qrcode-rsbuild-plugin'
|
|
47
47
|
* import { defineConfig } from '@lynx-js/rspeedy'
|
|
48
48
|
*
|
|
49
49
|
* export default defineConfig({
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,24 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__ from "node:fs";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
|
|
1
3
|
import * as __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__ from "node:process";
|
|
2
4
|
import * as __WEBPACK_EXTERNAL_MODULE_node_readline_91c31510__ from "node:readline";
|
|
3
|
-
import * as
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_tty_c64aab7e__ from "node:tty";
|
|
4
6
|
import * as __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__ from "node:util";
|
|
5
7
|
var __webpack_modules__ = {
|
|
8
|
+
"node:fs": function(module) {
|
|
9
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__;
|
|
10
|
+
},
|
|
11
|
+
"node:path": function(module) {
|
|
12
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__;
|
|
13
|
+
},
|
|
6
14
|
"node:process": function(module) {
|
|
7
15
|
module.exports = __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__;
|
|
8
16
|
},
|
|
9
17
|
"node:readline": function(module) {
|
|
10
18
|
module.exports = __WEBPACK_EXTERNAL_MODULE_node_readline_91c31510__;
|
|
11
19
|
},
|
|
12
|
-
"node:
|
|
13
|
-
module.exports =
|
|
20
|
+
"node:tty": function(module) {
|
|
21
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_node_tty_c64aab7e__;
|
|
14
22
|
},
|
|
15
23
|
"node:util": function(module) {
|
|
16
24
|
module.exports = __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__;
|
|
@@ -124,7 +132,7 @@ const gExistingShortcuts = new WeakSet();
|
|
|
124
132
|
async function registerConsoleShortcuts(options) {
|
|
125
133
|
const [{ default: showQRCode }] = await Promise.all([
|
|
126
134
|
Promise.all([
|
|
127
|
-
__webpack_require__.e("
|
|
135
|
+
__webpack_require__.e("441"),
|
|
128
136
|
__webpack_require__.e("640"),
|
|
129
137
|
__webpack_require__.e("204")
|
|
130
138
|
]).then(__webpack_require__.bind(__webpack_require__, "./src/showQRCode.ts"))
|
|
@@ -142,14 +150,15 @@ async function registerConsoleShortcuts(options) {
|
|
|
142
150
|
return off;
|
|
143
151
|
}
|
|
144
152
|
async function loop(options, value, devUrls) {
|
|
145
|
-
const [{ select, selectKey, isCancel, cancel }, { default: showQRCode }] = await Promise.all([
|
|
146
|
-
__webpack_require__.e("
|
|
153
|
+
const [{ autocomplete, select, selectKey, isCancel, cancel }, { default: showQRCode }] = await Promise.all([
|
|
154
|
+
__webpack_require__.e("441").then(__webpack_require__.bind(__webpack_require__, "../../../node_modules/.pnpm/@clack+prompts@1.0.0-alpha.1/node_modules/@clack/prompts/dist/index.mjs")),
|
|
147
155
|
Promise.all([
|
|
148
|
-
__webpack_require__.e("
|
|
156
|
+
__webpack_require__.e("441"),
|
|
149
157
|
__webpack_require__.e("640"),
|
|
150
158
|
__webpack_require__.e("204")
|
|
151
159
|
]).then(__webpack_require__.bind(__webpack_require__, "./src/showQRCode.ts"))
|
|
152
160
|
]);
|
|
161
|
+
const selectFn = (length)=>length > 5 ? autocomplete : select;
|
|
153
162
|
let currentEntry = options.entries[0];
|
|
154
163
|
let currentSchema = Object.keys(devUrls)[0];
|
|
155
164
|
while(!isCancel(value)){
|
|
@@ -178,7 +187,7 @@ async function loop(options, value, devUrls) {
|
|
|
178
187
|
});
|
|
179
188
|
if (isCancel(name) || 'q' === name || !gExistingShortcuts.has(options)) break;
|
|
180
189
|
if ('r' === name) {
|
|
181
|
-
const selection = await
|
|
190
|
+
const selection = await selectFn(options.entries.length)({
|
|
182
191
|
message: 'Select entry',
|
|
183
192
|
options: options.entries.map((entry)=>({
|
|
184
193
|
value: entry,
|
|
@@ -192,7 +201,7 @@ async function loop(options, value, devUrls) {
|
|
|
192
201
|
value = getCurrentUrl();
|
|
193
202
|
} else if ('a' === name) {
|
|
194
203
|
const devUrls = generateDevUrls(options.api, currentEntry, options.schema, options.port);
|
|
195
|
-
const selection = await
|
|
204
|
+
const selection = await selectFn(Object.keys(devUrls).length)({
|
|
196
205
|
message: 'Select schema',
|
|
197
206
|
options: Object.entries(devUrls).map(([name, url])=>({
|
|
198
207
|
value: name,
|
package/dist/shortcuts.js
CHANGED
|
@@ -1,16 +1,24 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__ from "node:fs";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
|
|
1
3
|
import * as __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__ from "node:process";
|
|
2
4
|
import * as __WEBPACK_EXTERNAL_MODULE_node_readline_91c31510__ from "node:readline";
|
|
3
|
-
import * as
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_tty_c64aab7e__ from "node:tty";
|
|
4
6
|
import * as __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__ from "node:util";
|
|
5
7
|
var __webpack_modules__ = {
|
|
8
|
+
"node:fs": function(module) {
|
|
9
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__;
|
|
10
|
+
},
|
|
11
|
+
"node:path": function(module) {
|
|
12
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__;
|
|
13
|
+
},
|
|
6
14
|
"node:process": function(module) {
|
|
7
15
|
module.exports = __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__;
|
|
8
16
|
},
|
|
9
17
|
"node:readline": function(module) {
|
|
10
18
|
module.exports = __WEBPACK_EXTERNAL_MODULE_node_readline_91c31510__;
|
|
11
19
|
},
|
|
12
|
-
"node:
|
|
13
|
-
module.exports =
|
|
20
|
+
"node:tty": function(module) {
|
|
21
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_node_tty_c64aab7e__;
|
|
14
22
|
},
|
|
15
23
|
"node:util": function(module) {
|
|
16
24
|
module.exports = __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__;
|
|
@@ -124,7 +132,7 @@ const gExistingShortcuts = new WeakSet();
|
|
|
124
132
|
async function registerConsoleShortcuts(options) {
|
|
125
133
|
const [{ default: showQRCode }] = await Promise.all([
|
|
126
134
|
Promise.all([
|
|
127
|
-
__webpack_require__.e("
|
|
135
|
+
__webpack_require__.e("441"),
|
|
128
136
|
__webpack_require__.e("640"),
|
|
129
137
|
__webpack_require__.e("204")
|
|
130
138
|
]).then(__webpack_require__.bind(__webpack_require__, "./src/showQRCode.ts"))
|
|
@@ -142,14 +150,15 @@ async function registerConsoleShortcuts(options) {
|
|
|
142
150
|
return off;
|
|
143
151
|
}
|
|
144
152
|
async function loop(options, value, devUrls) {
|
|
145
|
-
const [{ select, selectKey, isCancel, cancel }, { default: showQRCode }] = await Promise.all([
|
|
146
|
-
__webpack_require__.e("
|
|
153
|
+
const [{ autocomplete, select, selectKey, isCancel, cancel }, { default: showQRCode }] = await Promise.all([
|
|
154
|
+
__webpack_require__.e("441").then(__webpack_require__.bind(__webpack_require__, "../../../node_modules/.pnpm/@clack+prompts@1.0.0-alpha.1/node_modules/@clack/prompts/dist/index.mjs")),
|
|
147
155
|
Promise.all([
|
|
148
|
-
__webpack_require__.e("
|
|
156
|
+
__webpack_require__.e("441"),
|
|
149
157
|
__webpack_require__.e("640"),
|
|
150
158
|
__webpack_require__.e("204")
|
|
151
159
|
]).then(__webpack_require__.bind(__webpack_require__, "./src/showQRCode.ts"))
|
|
152
160
|
]);
|
|
161
|
+
const selectFn = (length)=>length > 5 ? autocomplete : select;
|
|
153
162
|
let currentEntry = options.entries[0];
|
|
154
163
|
let currentSchema = Object.keys(devUrls)[0];
|
|
155
164
|
while(!isCancel(value)){
|
|
@@ -178,7 +187,7 @@ async function loop(options, value, devUrls) {
|
|
|
178
187
|
});
|
|
179
188
|
if (isCancel(name) || 'q' === name || !gExistingShortcuts.has(options)) break;
|
|
180
189
|
if ('r' === name) {
|
|
181
|
-
const selection = await
|
|
190
|
+
const selection = await selectFn(options.entries.length)({
|
|
182
191
|
message: 'Select entry',
|
|
183
192
|
options: options.entries.map((entry)=>({
|
|
184
193
|
value: entry,
|
|
@@ -192,7 +201,7 @@ async function loop(options, value, devUrls) {
|
|
|
192
201
|
value = getCurrentUrl();
|
|
193
202
|
} else if ('a' === name) {
|
|
194
203
|
const devUrls = generateDevUrls(options.api, currentEntry, options.schema, options.port);
|
|
195
|
-
const selection = await
|
|
204
|
+
const selection = await selectFn(Object.keys(devUrls).length)({
|
|
196
205
|
message: 'Select schema',
|
|
197
206
|
options: Object.entries(devUrls).map(([name, url])=>({
|
|
198
207
|
value: name,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/qrcode-rsbuild-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A rsbuild plugin for printing QRCode in terminal",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rsbuild",
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"README.md"
|
|
44
44
|
],
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@clack/prompts": "
|
|
47
|
-
"@microsoft/api-extractor": "7.52.
|
|
48
|
-
"@rsbuild/core": "1.3.
|
|
46
|
+
"@clack/prompts": "1.0.0-alpha.1",
|
|
47
|
+
"@microsoft/api-extractor": "7.52.8",
|
|
48
|
+
"@rsbuild/core": "1.3.21",
|
|
49
49
|
"picocolors": "^1.1.1",
|
|
50
50
|
"uqr": "0.1.2",
|
|
51
|
-
"@lynx-js/rspeedy": "0.9.
|
|
51
|
+
"@lynx-js/rspeedy": "0.9.11"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=18"
|