quickbundle 0.0.0-next-3b75337 → 0.0.0-next-919d4ea
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/bin/index.mjs +2 -2
- package/dist/index.mjs +28 -13
- package/package.json +4 -4
package/bin/index.mjs
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const package_ = createRequire(import.meta.url)("../package.json");
|
|
7
7
|
|
|
8
|
-
import(join("..",
|
|
8
|
+
import(join("..", package_.exports["."].default));
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { finished } from 'node:stream/promises';
|
|
|
3
3
|
import { Readable } from 'node:stream';
|
|
4
4
|
import process from 'node:process';
|
|
5
5
|
import { resolve, dirname, join, basename } from 'node:path';
|
|
6
|
-
import { copyFile as copyFile$1,
|
|
6
|
+
import { mkdir, copyFile as copyFile$1, rename, writeFile as writeFile$1, rm, readFile as readFile$1 } from 'node:fs/promises';
|
|
7
7
|
import { createWriteStream } from 'node:fs';
|
|
8
8
|
import decompress from 'decompress';
|
|
9
9
|
import { watch as watch$1, rollup } from 'rollup';
|
|
@@ -19,7 +19,7 @@ import os from 'node:os';
|
|
|
19
19
|
import { gzipSize } from 'gzip-size';
|
|
20
20
|
|
|
21
21
|
var name = "quickbundle";
|
|
22
|
-
var version = "0.0.0-next-
|
|
22
|
+
var version = "0.0.0-next-919d4ea";
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Resolve a relative path from the Quickbundle node modules directory.
|
|
@@ -121,14 +121,16 @@ const watch = (input)=>{
|
|
|
121
121
|
case "START":
|
|
122
122
|
{
|
|
123
123
|
startDuration = Date.now();
|
|
124
|
-
clearLog(
|
|
124
|
+
clearLog("Build in progress…", {
|
|
125
125
|
type: "information"
|
|
126
126
|
});
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
129
|
case "BUNDLE_END":
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
{
|
|
131
|
+
await event.result.close();
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
132
134
|
case "END":
|
|
133
135
|
{
|
|
134
136
|
const duration = Date.now() - startDuration;
|
|
@@ -156,11 +158,12 @@ const clearLog = (...input)=>{
|
|
|
156
158
|
|
|
157
159
|
const require = createRequire(import.meta.url);
|
|
158
160
|
const PKG = require(resolveFromExternalDirectory("package.json"));
|
|
159
|
-
const
|
|
161
|
+
const DEFAULT_OPTIONS = {
|
|
160
162
|
minification: false,
|
|
161
163
|
sourceMaps: false,
|
|
162
164
|
standalone: false
|
|
163
|
-
}
|
|
165
|
+
};
|
|
166
|
+
const createConfiguration = (options = DEFAULT_OPTIONS)=>{
|
|
164
167
|
const buildableExports = getBuildableExports(options);
|
|
165
168
|
return {
|
|
166
169
|
data: buildableExports.flatMap((buildableExport)=>{
|
|
@@ -377,8 +380,8 @@ const build = async (input)=>{
|
|
|
377
380
|
elapsedTime: Date.now() - initialTime,
|
|
378
381
|
filePath: outputFilePath
|
|
379
382
|
});
|
|
380
|
-
}).catch((
|
|
381
|
-
reject(
|
|
383
|
+
}).catch((error)=>{
|
|
384
|
+
reject(error);
|
|
382
385
|
});
|
|
383
386
|
}));
|
|
384
387
|
}
|
|
@@ -468,15 +471,23 @@ const getOsType = (input)=>{
|
|
|
468
471
|
switch(input){
|
|
469
472
|
case "Windows_NT":
|
|
470
473
|
case "win":
|
|
471
|
-
|
|
474
|
+
{
|
|
475
|
+
return "windows";
|
|
476
|
+
}
|
|
472
477
|
case "Darwin":
|
|
473
478
|
case "darwin":
|
|
474
|
-
|
|
479
|
+
{
|
|
480
|
+
return "macos";
|
|
481
|
+
}
|
|
475
482
|
case "Linux":
|
|
476
483
|
case "linux":
|
|
477
|
-
|
|
484
|
+
{
|
|
485
|
+
return "linux";
|
|
486
|
+
}
|
|
478
487
|
default:
|
|
479
|
-
|
|
488
|
+
{
|
|
489
|
+
throw new Error(`Unsupported operating system \`${input}\``);
|
|
490
|
+
}
|
|
480
491
|
}
|
|
481
492
|
};
|
|
482
493
|
const matchRuntimeParts = createRegExpMatcher(/^node-(?<version>v\d+\.\d+\.\d+)-(?<os>darwin|linux|win)-(?<architecture>arm64|x64|x86)$/);
|
|
@@ -547,6 +558,10 @@ const createBuildCommand = (program)=>{
|
|
|
547
558
|
return index === 0 ? message : ` ${message}`;
|
|
548
559
|
}).join("\n"), {
|
|
549
560
|
label: `${item.filePath} (took ${item.elapsedTime}ms)`,
|
|
561
|
+
lineBreak: {
|
|
562
|
+
end: false,
|
|
563
|
+
start: true
|
|
564
|
+
},
|
|
550
565
|
type: "information"
|
|
551
566
|
});
|
|
552
567
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quickbundle",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-919d4ea",
|
|
4
4
|
"description": "The zero-configuration transpiler and bundler for the web",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Ayoub Adib",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"@rollup/plugin-json": "^6.1.0",
|
|
53
53
|
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
54
54
|
"@rollup/plugin-url": "^8.0.2",
|
|
55
|
-
"@swc/core": "^1.9.
|
|
55
|
+
"@swc/core": "^1.9.2",
|
|
56
56
|
"decompress": "^4.2.1",
|
|
57
57
|
"gzip-size": "^7.0.0",
|
|
58
|
-
"rollup": "^4.
|
|
58
|
+
"rollup": "^4.27.2",
|
|
59
59
|
"rollup-plugin-dts": "^6.1.1",
|
|
60
60
|
"rollup-plugin-node-externals": "^7.1.3",
|
|
61
61
|
"rollup-plugin-swc3": "^0.12.1",
|
|
62
|
-
"termost": "^1.
|
|
62
|
+
"termost": "^1.4.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@types/decompress": "4.2.7",
|