ipx 3.1.0 → 3.1.1
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/cli.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const listhen = require('listhen');
|
|
4
4
|
const citty = require('citty');
|
|
5
5
|
const cli = require('listhen/cli');
|
|
6
|
-
const nodeFs = require('./shared/ipx.
|
|
6
|
+
const nodeFs = require('./shared/ipx.GUc23orS.cjs');
|
|
7
7
|
require('defu');
|
|
8
8
|
require('ufo');
|
|
9
9
|
require('h3');
|
|
@@ -15,7 +15,7 @@ require('ofetch');
|
|
|
15
15
|
require('pathe');
|
|
16
16
|
|
|
17
17
|
const name = "ipx";
|
|
18
|
-
const version = "3.1.
|
|
18
|
+
const version = "3.1.1";
|
|
19
19
|
const description = "High performance, secure and easy-to-use image optimizer.";
|
|
20
20
|
|
|
21
21
|
const serve = citty.defineCommand({
|
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { listen } from 'listhen';
|
|
2
2
|
import { defineCommand, runMain } from 'citty';
|
|
3
3
|
import { getArgs, parseArgs } from 'listhen/cli';
|
|
4
|
-
import { c as createIPX, i as ipxHttpStorage, g as ipxFSStorage, e as createIPXNodeServer } from './shared/ipx.
|
|
4
|
+
import { c as createIPX, i as ipxHttpStorage, g as ipxFSStorage, e as createIPXNodeServer } from './shared/ipx.CXJeaylD.mjs';
|
|
5
5
|
import 'defu';
|
|
6
6
|
import 'ufo';
|
|
7
7
|
import 'h3';
|
|
@@ -13,7 +13,7 @@ import 'ofetch';
|
|
|
13
13
|
import 'pathe';
|
|
14
14
|
|
|
15
15
|
const name = "ipx";
|
|
16
|
-
const version = "3.1.
|
|
16
|
+
const version = "3.1.1";
|
|
17
17
|
const description = "High performance, secure and easy-to-use image optimizer.";
|
|
18
18
|
|
|
19
19
|
const serve = defineCommand({
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as createIPX, b as createIPXH3App, a as createIPXH3Handler, e as createIPXNodeServer, f as createIPXPlainServer, d as createIPXWebServer, g as ipxFSStorage, i as ipxHttpStorage } from './shared/ipx.
|
|
1
|
+
export { c as createIPX, b as createIPXH3App, a as createIPXH3Handler, e as createIPXNodeServer, f as createIPXPlainServer, d as createIPXWebServer, g as ipxFSStorage, i as ipxHttpStorage } from './shared/ipx.CXJeaylD.mjs';
|
|
2
2
|
import { createError } from 'h3';
|
|
3
3
|
import 'defu';
|
|
4
4
|
import 'ufo';
|
|
@@ -695,7 +695,7 @@ function ipxFSStorage(_options = {}) {
|
|
|
695
695
|
const fs = await _getFS();
|
|
696
696
|
for (const dir of dirs) {
|
|
697
697
|
const filePath = join(dir, id);
|
|
698
|
-
if (!isValidPath(filePath) || !filePath.startsWith(dir)) {
|
|
698
|
+
if (!isValidPath(filePath) || !filePath.startsWith(dir + "/")) {
|
|
699
699
|
throw createError({
|
|
700
700
|
statusCode: 403,
|
|
701
701
|
statusText: `IPX_FORBIDDEN_PATH`,
|
|
@@ -702,7 +702,7 @@ function ipxFSStorage(_options = {}) {
|
|
|
702
702
|
const fs = await _getFS();
|
|
703
703
|
for (const dir of dirs) {
|
|
704
704
|
const filePath = pathe.join(dir, id);
|
|
705
|
-
if (!isValidPath(filePath) || !filePath.startsWith(dir)) {
|
|
705
|
+
if (!isValidPath(filePath) || !filePath.startsWith(dir + "/")) {
|
|
706
706
|
throw h3.createError({
|
|
707
707
|
statusCode: 403,
|
|
708
708
|
statusText: `IPX_FORBIDDEN_PATH`,
|