storybooker 0.11.0 → 0.12.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/dist/index.js +7 -8
- package/package.json +5 -5
- package/src/utils/zip.ts +5 -3
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { tmpdir } from "node:os";
|
|
|
14
14
|
|
|
15
15
|
//#region package.json
|
|
16
16
|
var name = "storybooker";
|
|
17
|
-
var version = "0.
|
|
17
|
+
var version = "0.12.0";
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/utils/auth-utils.ts
|
|
@@ -60,8 +60,7 @@ function buildStoryBook({ build, cwd, silent }) {
|
|
|
60
60
|
let output = "";
|
|
61
61
|
if (typeof build === "string" && build.trim() !== "") {
|
|
62
62
|
console.log("> Building StoryBook with script: %s", build);
|
|
63
|
-
|
|
64
|
-
output = spawnSync(pkgManager, ["run", build], {
|
|
63
|
+
output = spawnSync(detectPackageManager(cwd), ["run", build], {
|
|
65
64
|
cwd,
|
|
66
65
|
shell: true,
|
|
67
66
|
stdio: silent ? void 0 : "inherit",
|
|
@@ -119,8 +118,7 @@ function runTest(test, options) {
|
|
|
119
118
|
const { cwd, silent, testCoverageDir, testReportDir } = options;
|
|
120
119
|
if (typeof test === "string" && test.trim() !== "") {
|
|
121
120
|
console.log("> Testing StoryBook with script: %s", test);
|
|
122
|
-
|
|
123
|
-
spawnSync(pkgManager, ["run", test], {
|
|
121
|
+
spawnSync(detectPackageManager(cwd), ["run", test], {
|
|
124
122
|
cwd,
|
|
125
123
|
shell: true,
|
|
126
124
|
stdio: silent ? void 0 : "inherit"
|
|
@@ -266,22 +264,23 @@ const isWindows = process.platform === "win32";
|
|
|
266
264
|
* It throws an error if the `zip` command is not available on Unix-like systems.
|
|
267
265
|
*/
|
|
268
266
|
function zip(inPath, outPath) {
|
|
267
|
+
let _InPath = inPath;
|
|
269
268
|
if (isWindows) {
|
|
270
269
|
if (fs.statSync(inPath).isFile()) {
|
|
271
270
|
const inFile = fs.readFileSync(inPath);
|
|
272
271
|
const tmpPath = path.join(tmpdir(), `cross-zip-${Date.now()}`);
|
|
273
272
|
fs.mkdirSync(tmpPath);
|
|
274
273
|
fs.writeFileSync(path.join(tmpPath, path.basename(inPath)), inFile);
|
|
275
|
-
|
|
274
|
+
_InPath = tmpPath;
|
|
276
275
|
}
|
|
277
276
|
fs.rmdirSync(outPath, {
|
|
278
277
|
recursive: true,
|
|
279
278
|
maxRetries: 3
|
|
280
279
|
});
|
|
281
280
|
}
|
|
282
|
-
const cwd = path.dirname(
|
|
281
|
+
const cwd = path.dirname(_InPath);
|
|
283
282
|
const zipCmd = getZipCommand();
|
|
284
|
-
const zipCmdArgs = getZipArgs(
|
|
283
|
+
const zipCmdArgs = getZipArgs(_InPath, outPath);
|
|
285
284
|
try {
|
|
286
285
|
execSync([zipCmd, ...zipCmdArgs].join(" "), {
|
|
287
286
|
cwd,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "storybooker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": "./dist/index.js",
|
|
6
6
|
"description": "Storybooker CLI for uploading builds and files.",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^22.0.0",
|
|
41
41
|
"@types/yargs": "^17.0.33",
|
|
42
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
42
|
+
"@typescript/native-preview": "^7.0.0-dev.20251024.1",
|
|
43
43
|
"openapi-typescript": "^7.9.1",
|
|
44
|
-
"oxlint": "^1.
|
|
45
|
-
"oxlint-tsgolint": "^0.
|
|
44
|
+
"oxlint": "^1.24.0",
|
|
45
|
+
"oxlint-tsgolint": "^0.3.0",
|
|
46
46
|
"prettier": "^3.6.2",
|
|
47
|
-
"tsdown": "^0.
|
|
47
|
+
"tsdown": "^0.15.9",
|
|
48
48
|
"typescript": "^5.9.2"
|
|
49
49
|
}
|
|
50
50
|
}
|
package/src/utils/zip.ts
CHANGED
|
@@ -14,20 +14,22 @@ const isWindows = process.platform === "win32";
|
|
|
14
14
|
* It throws an error if the `zip` command is not available on Unix-like systems.
|
|
15
15
|
*/
|
|
16
16
|
export function zip(inPath: string, outPath: fs.PathLike): void {
|
|
17
|
+
let _InPath = inPath;
|
|
18
|
+
|
|
17
19
|
if (isWindows) {
|
|
18
20
|
if (fs.statSync(inPath).isFile()) {
|
|
19
21
|
const inFile = fs.readFileSync(inPath);
|
|
20
22
|
const tmpPath = path.join(tmpdir(), `cross-zip-${Date.now()}`);
|
|
21
23
|
fs.mkdirSync(tmpPath);
|
|
22
24
|
fs.writeFileSync(path.join(tmpPath, path.basename(inPath)), inFile);
|
|
23
|
-
|
|
25
|
+
_InPath = tmpPath;
|
|
24
26
|
}
|
|
25
27
|
fs.rmdirSync(outPath, { recursive: true, maxRetries: 3 });
|
|
26
28
|
}
|
|
27
29
|
|
|
28
|
-
const cwd = path.dirname(
|
|
30
|
+
const cwd = path.dirname(_InPath);
|
|
29
31
|
const zipCmd = getZipCommand();
|
|
30
|
-
const zipCmdArgs = getZipArgs(
|
|
32
|
+
const zipCmdArgs = getZipArgs(_InPath, outPath);
|
|
31
33
|
try {
|
|
32
34
|
execSync([zipCmd, ...zipCmdArgs].join(" "), {
|
|
33
35
|
cwd,
|