@shopify/cli 3.80.7 → 3.81.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/assets/dev-console/extensions/dev-console/assets/index-ohOjvIJh.js +64 -0
- package/dist/assets/dev-console/index.html +1 -1
- package/dist/assets/hydrogen/starter/.cursor/rules/cookbook-recipe-subscriptions.mdc +921 -0
- package/dist/assets/hydrogen/starter/CHANGELOG.md +0 -35
- package/dist/assets/hydrogen/starter/app/components/AddToCartButton.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/CartLineItem.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/Footer.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/Header.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/PageLayout.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/ProductItem.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/SearchForm.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/SearchFormPredictive.tsx +6 -1
- package/dist/assets/hydrogen/starter/app/components/SearchResults.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/SearchResultsPredictive.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/entry.client.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/entry.server.tsx +4 -9
- package/dist/assets/hydrogen/starter/app/lib/variants.ts +1 -1
- package/dist/assets/hydrogen/starter/app/root.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/_index.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/account.orders.$id.tsx +4 -4
- package/dist/assets/hydrogen/starter/app/routes/account.orders._index.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +7 -1
- package/dist/assets/hydrogen/starter/app/routes/account.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle.$articleHandle.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle._index.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/blogs._index.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/cart.tsx +2 -7
- package/dist/assets/hydrogen/starter/app/routes/collections.$handle.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/collections._index.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/pages.$handle.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/policies.$handle.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/policies._index.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/search.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes.ts +2 -2
- package/dist/assets/hydrogen/starter/env.d.ts +2 -12
- package/dist/assets/hydrogen/starter/eslint.config.js +0 -2
- package/dist/assets/hydrogen/starter/package.json +12 -11
- package/dist/assets/hydrogen/starter/server.ts +5 -2
- package/dist/assets/hydrogen/starter/tsconfig.json +6 -18
- package/dist/assets/hydrogen/starter/vite.config.ts +24 -3
- package/dist/assets/hydrogen/tailwind/package.json +1 -4
- package/dist/assets/hydrogen/virtual-routes/components/RequestDetails.jsx +1 -1
- package/dist/assets/hydrogen/virtual-routes/layout.jsx +7 -1
- package/dist/assets/hydrogen/virtual-routes/routes/index.jsx +1 -1
- package/dist/assets/hydrogen/virtual-routes/routes/subrequest-profiler.jsx +1 -1
- package/dist/assets/hydrogen/virtual-routes/virtual-root-with-layout.jsx +1 -1
- package/dist/assets/hydrogen/virtual-routes/virtual-root.jsx +1 -1
- package/dist/assets/hydrogen/vite/vite.config.js +1 -1
- package/dist/{chunk-TNF6QFVZ.js → chunk-27MYZBXV.js} +28 -31
- package/dist/{chunk-63DIRIVX.js → chunk-2Y3UFXD6.js} +242 -216
- package/dist/{chunk-YQXBJZRZ.js → chunk-5CZUSVND.js} +2 -2
- package/dist/{chunk-TMYCLPMW.js → chunk-5LMBCQDG.js} +544 -336
- package/dist/{chunk-KGZTFG3M.js → chunk-5NWUTFCV.js} +3 -3
- package/dist/{chunk-JRAEVQWT.js → chunk-5OBLOY7U.js} +2 -2
- package/dist/{chunk-RJJFC36J.js → chunk-5RPSJUXQ.js} +28 -28
- package/dist/{chunk-5K4EFFDY.js → chunk-6CJ6BGWA.js} +9 -8
- package/dist/{chunk-OQ7ZCSZM.js → chunk-6GAIDVJR.js} +8 -6
- package/dist/{chunk-PJZWUPY4.js → chunk-6NGGBF47.js} +5 -5
- package/dist/{chunk-XZM7J5LL.js → chunk-ALHM5GST.js} +5 -5
- package/dist/{chunk-ECV2CLGW.js → chunk-B44H2P6E.js} +4 -4
- package/dist/{chunk-T6CKLCY3.js → chunk-B5JZHKPR.js} +3 -3
- package/dist/{chunk-IHC7Q4LY.js → chunk-CN7P6XXP.js} +4 -4
- package/dist/{chunk-TJM3YBLQ.js → chunk-CTFDRWUN.js} +15 -12
- package/dist/{chunk-HWRJLLWI.js → chunk-DDYH6337.js} +2 -2
- package/dist/{chunk-NY2OPNXU.js → chunk-E6T6HFSE.js} +5 -5
- package/dist/{chunk-CDBXAE2F.js → chunk-EG6MBBEN.js} +99 -11
- package/dist/{chunk-OWRPRJTD.js → chunk-FAITFLRX.js} +2 -2
- package/dist/{chunk-ZOUELNMC.js → chunk-GMFX4XJF.js} +3 -3
- package/dist/{chunk-2W6OLZFD.js → chunk-H37YPI3Y.js} +3 -3
- package/dist/{chunk-RJ4CN43L.js → chunk-I2M5KL5Z.js} +4 -4
- package/dist/{chunk-VYIBTTN2.js → chunk-JKKYVUPT.js} +3 -3
- package/dist/{chunk-QPXAGLXJ.js → chunk-JV3N43QW.js} +5 -5
- package/dist/{chunk-NSTNFY7W.js → chunk-KJXXNUND.js} +45 -23
- package/dist/{chunk-5AFYDRV4.js → chunk-LPU2VGJR.js} +42 -507
- package/dist/{chunk-KUZYMDX4.js → chunk-NEQJPNB5.js} +8 -8
- package/dist/{chunk-5YH5HMRM.js → chunk-NZVDI2PG.js} +3 -3
- package/dist/{chunk-W4ZWJMX2.js → chunk-O66CPW2Z.js} +2 -2
- package/dist/{chunk-PDNRVFZE.js → chunk-OU2VE5NL.js} +16 -11
- package/dist/{chunk-RFO2FC5M.js → chunk-PINTEIWG.js} +6 -6
- package/dist/{chunk-JDRMHPFL.js → chunk-PLXKIAXS.js} +4 -4
- package/dist/{chunk-MQCYR4KR.js → chunk-R7PQLQRT.js} +4 -4
- package/dist/{chunk-MSHN7O5N.js → chunk-SOZ33QZX.js} +2 -2
- package/dist/{chunk-LQ2ZKVR6.js → chunk-UMUTXITN.js} +87 -4
- package/dist/chunk-V67D4V7T.js +107 -0
- package/dist/{chunk-77RMKCKT.js → chunk-VANXFY34.js} +2 -2
- package/dist/chunk-W5G2YPO2.js +11805 -0
- package/dist/{chunk-3DYG3ZWU.js → chunk-WSP4T6BG.js} +3 -3
- package/dist/{chunk-JU6SOKDJ.js → chunk-X2GG47RT.js} +4 -4
- package/dist/{chunk-HYECXSZG.js → chunk-ZARNHYRC.js} +276 -77
- package/dist/cli/commands/auth/logout.js +16 -17
- package/dist/cli/commands/auth/logout.test.js +18 -19
- package/dist/cli/commands/cache/clear.js +15 -16
- package/dist/cli/commands/debug/command-flags.js +15 -16
- package/dist/cli/commands/docs/generate.js +15 -16
- package/dist/cli/commands/docs/generate.test.js +16 -17
- package/dist/cli/commands/help.js +15 -16
- package/dist/cli/commands/kitchen-sink/async.js +16 -17
- package/dist/cli/commands/kitchen-sink/async.test.js +17 -18
- package/dist/cli/commands/kitchen-sink/index.js +18 -19
- package/dist/cli/commands/kitchen-sink/index.test.js +19 -20
- package/dist/cli/commands/kitchen-sink/prompts.js +16 -17
- package/dist/cli/commands/kitchen-sink/prompts.test.js +17 -18
- package/dist/cli/commands/kitchen-sink/static.js +16 -17
- package/dist/cli/commands/kitchen-sink/static.test.js +17 -18
- package/dist/cli/commands/notifications/generate.js +16 -17
- package/dist/cli/commands/notifications/list.js +16 -17
- package/dist/cli/commands/search.js +16 -17
- package/dist/cli/commands/upgrade.js +16 -17
- package/dist/cli/commands/upgrade.test.js +1 -2
- package/dist/cli/commands/version.js +16 -17
- package/dist/cli/commands/version.test.js +17 -18
- package/dist/cli/services/commands/notifications.js +11 -12
- package/dist/cli/services/commands/search.js +7 -8
- package/dist/cli/services/commands/search.test.js +8 -9
- package/dist/cli/services/commands/version.js +8 -9
- package/dist/cli/services/commands/version.test.js +10 -11
- package/dist/cli/services/kitchen-sink/async.js +7 -8
- package/dist/cli/services/kitchen-sink/prompts.js +7 -8
- package/dist/cli/services/kitchen-sink/static.js +7 -8
- package/dist/cli/services/upgrade.js +8 -9
- package/dist/cli/services/upgrade.test.js +10 -11
- package/dist/{custom-oclif-loader-XTWWK7GM.js → custom-oclif-loader-7E5Z2M56.js} +7 -8
- package/dist/{del-YIU34DZ5.js → del-4JSTEFDW.js} +3 -3
- package/dist/{devtools-J4QAI6HR.js → devtools-LDCSRUXB.js} +4 -4
- package/dist/{error-handler-MIQWANES.js → error-handler-GHVJK7OK.js} +13 -14
- package/dist/hooks/postrun.js +11 -12
- package/dist/hooks/prerun.js +12 -13
- package/dist/{http-proxy-KGLXPNEY.js → http-proxy-LHSVRGJ5.js} +14 -10
- package/dist/index.js +153266 -162667
- package/dist/{lib-MIBR2T7P.js → lib-2ZBT3UR2.js} +5 -5
- package/dist/{local-OL4QQF7A.js → local-GLHD5LYH.js} +9 -14
- package/dist/{magic-string.es-BSVDQOZI.js → magic-string.es-UZAAPNRE.js} +42 -36
- package/dist/{morph-3VOLMA55.js → morph-DFRO3NRL.js} +10 -10
- package/dist/node-OFSPLONP.js +164 -0
- package/dist/{node-package-manager-YZ7SC7JY.js → node-package-manager-K7DEALW5.js} +8 -9
- package/dist/{out-5KP5WGIK.js → out-NKJPLKLB.js} +2 -2
- package/dist/{path-2K5HIMHZ.js → path-GB4VIEM6.js} +2 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-UMSB2BWG.js → ui-G7IYCY5T.js} +7 -10
- package/dist/{workerd-K4ZX64LQ.js → workerd-IDTCFUND.js} +18 -20
- package/oclif.manifest.json +29 -9
- package/package.json +10 -11
- package/dist/assets/dev-console/extensions/dev-console/assets/index-CqNhY1h-.js +0 -64
- package/dist/assets/hydrogen/starter/.cursor/rules/hydrogen-react-router.mdc +0 -52
- package/dist/assets/hydrogen/starter/app/routes/api.$version.[graphql.json].tsx +0 -14
- package/dist/assets/hydrogen/starter/react-router.config.ts +0 -7
- package/dist/chunk-3I3GQNEW.js +0 -95
- package/dist/chunk-57Q6OQG4.js +0 -111
- package/dist/chunk-ZEM3T4UY.js +0 -10590
- package/dist/toml-patch-wasm-J5VGG6WG.js +0 -140
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description:
|
|
3
|
-
globs:
|
|
4
|
-
alwaysApply: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# React Router Import Rule for Hydrogen
|
|
8
|
-
|
|
9
|
-
## Overview
|
|
10
|
-
|
|
11
|
-
This Hydrogen project is based on React Router, not Remix. When working with documentation or code examples, you should always use imports from the appropriate React Router packages instead of Remix packages.
|
|
12
|
-
|
|
13
|
-
## Import Replacements
|
|
14
|
-
|
|
15
|
-
When you see imports from Remix packages, replace them with their equivalent React Router v7 packages. Here are the common replacements:
|
|
16
|
-
|
|
17
|
-
| Remix v2 Package | React Router v7 Package |
|
|
18
|
-
|------------------|-------------------------|
|
|
19
|
-
| `@remix-run/react` | `react-router` |
|
|
20
|
-
| `@remix-run/dev` | `@react-router/dev` |
|
|
21
|
-
| `@remix-run/architect` | `@react-router/architect` |
|
|
22
|
-
| `@remix-run/cloudflare` | `@react-router/cloudflare` |
|
|
23
|
-
| `@remix-run/express` | `@react-router/express` |
|
|
24
|
-
| `@remix-run/fs-routes` | `@react-router/fs-routes` |
|
|
25
|
-
| `@remix-run/node` | `@react-router/node` |
|
|
26
|
-
| `@remix-run/route-config` | `@react-router/dev` |
|
|
27
|
-
| `@remix-run/routes-option-adapter` | `@react-router/remix-routes-option-adapter` |
|
|
28
|
-
| `@remix-run/serve` | `@react-router/serve` |
|
|
29
|
-
| `@remix-run/server-runtime` | `react-router` |
|
|
30
|
-
| `@remix-run/testing` | `react-router` |
|
|
31
|
-
|
|
32
|
-
NEVER USE 'react-router-dom' imports!
|
|
33
|
-
|
|
34
|
-
## Common Import Examples
|
|
35
|
-
|
|
36
|
-
```js
|
|
37
|
-
// INCORRECT (Remix style)
|
|
38
|
-
import { useLoaderData, Link, Form, useActionData, useNavigation, useSubmit } from '@remix-run/react';
|
|
39
|
-
|
|
40
|
-
// CORRECT (React Router style)
|
|
41
|
-
import { useLoaderData, Link, Form, useActionData, useNavigation, useSubmit } from 'react-router';
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## Development Guidelines
|
|
45
|
-
|
|
46
|
-
1. Always check existing code in the project to understand which specific React Router hooks and components are being used
|
|
47
|
-
2. When generating new code or modifying existing code, ensure all routing-related imports come from the correct React Router packages
|
|
48
|
-
3. If following documentation or examples based on Remix, adapt the code to use React Router equivalents
|
|
49
|
-
|
|
50
|
-
When working in this codebase, always follow the React Router patterns that are already established in the existing code.
|
|
51
|
-
|
|
52
|
-
For more information, consult the official Remix to React Router upgrade guide: https://reactrouter.com/upgrading/remix
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {LoaderFunctionArgs} from 'react-router';
|
|
2
|
-
|
|
3
|
-
export async function action({params, context, request}: LoaderFunctionArgs) {
|
|
4
|
-
const response = await fetch(
|
|
5
|
-
`https://${context.env.PUBLIC_CHECKOUT_DOMAIN}/api/${params.version}/graphql.json`,
|
|
6
|
-
{
|
|
7
|
-
method: 'POST',
|
|
8
|
-
body: request.body,
|
|
9
|
-
headers: request.headers,
|
|
10
|
-
},
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
return new Response(response.body, {headers: new Headers(response.headers)});
|
|
14
|
-
}
|
package/dist/chunk-3I3GQNEW.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__commonJS,
|
|
3
|
-
__require,
|
|
4
|
-
init_cjs_shims
|
|
5
|
-
} from "./chunk-PKR7KJ6P.js";
|
|
6
|
-
|
|
7
|
-
// ../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
|
|
8
|
-
var require_has_flag = __commonJS({
|
|
9
|
-
"../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module) {
|
|
10
|
-
"use strict";
|
|
11
|
-
init_cjs_shims();
|
|
12
|
-
module.exports = (flag, argv = process.argv) => {
|
|
13
|
-
let prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--", position = argv.indexOf(prefix + flag), terminatorPosition = argv.indexOf("--");
|
|
14
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
// ../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js
|
|
20
|
-
var require_supports_color = __commonJS({
|
|
21
|
-
"../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js"(exports, module) {
|
|
22
|
-
"use strict";
|
|
23
|
-
init_cjs_shims();
|
|
24
|
-
var os = __require("os"), tty = __require("tty"), hasFlag = require_has_flag(), { env } = process, flagForceColor;
|
|
25
|
-
hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never") ? flagForceColor = 0 : (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) && (flagForceColor = 1);
|
|
26
|
-
function envForceColor() {
|
|
27
|
-
if ("FORCE_COLOR" in env)
|
|
28
|
-
return env.FORCE_COLOR === "true" ? 1 : env.FORCE_COLOR === "false" ? 0 : env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
29
|
-
}
|
|
30
|
-
function translateLevel(level) {
|
|
31
|
-
return level === 0 ? !1 : {
|
|
32
|
-
level,
|
|
33
|
-
hasBasic: !0,
|
|
34
|
-
has256: level >= 2,
|
|
35
|
-
has16m: level >= 3
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
function supportsColor(haveStream, { streamIsTTY, sniffFlags = !0 } = {}) {
|
|
39
|
-
let noFlagForceColor = envForceColor();
|
|
40
|
-
noFlagForceColor !== void 0 && (flagForceColor = noFlagForceColor);
|
|
41
|
-
let forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
42
|
-
if (forceColor === 0)
|
|
43
|
-
return 0;
|
|
44
|
-
if (sniffFlags) {
|
|
45
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor"))
|
|
46
|
-
return 3;
|
|
47
|
-
if (hasFlag("color=256"))
|
|
48
|
-
return 2;
|
|
49
|
-
}
|
|
50
|
-
if (haveStream && !streamIsTTY && forceColor === void 0)
|
|
51
|
-
return 0;
|
|
52
|
-
let min = forceColor || 0;
|
|
53
|
-
if (env.TERM === "dumb")
|
|
54
|
-
return min;
|
|
55
|
-
if (process.platform === "win32") {
|
|
56
|
-
let osRelease = os.release().split(".");
|
|
57
|
-
return Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586 ? Number(osRelease[2]) >= 14931 ? 3 : 2 : 1;
|
|
58
|
-
}
|
|
59
|
-
if ("CI" in env)
|
|
60
|
-
return ["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship" ? 1 : min;
|
|
61
|
-
if ("TEAMCITY_VERSION" in env)
|
|
62
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
63
|
-
if (env.COLORTERM === "truecolor")
|
|
64
|
-
return 3;
|
|
65
|
-
if ("TERM_PROGRAM" in env) {
|
|
66
|
-
let version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
67
|
-
switch (env.TERM_PROGRAM) {
|
|
68
|
-
case "iTerm.app":
|
|
69
|
-
return version >= 3 ? 3 : 2;
|
|
70
|
-
case "Apple_Terminal":
|
|
71
|
-
return 2;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return /-256(color)?$/i.test(env.TERM) ? 2 : /^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM) || "COLORTERM" in env ? 1 : min;
|
|
75
|
-
}
|
|
76
|
-
function getSupportLevel(stream, options = {}) {
|
|
77
|
-
let level = supportsColor(stream, {
|
|
78
|
-
streamIsTTY: stream && stream.isTTY,
|
|
79
|
-
...options
|
|
80
|
-
});
|
|
81
|
-
return translateLevel(level);
|
|
82
|
-
}
|
|
83
|
-
module.exports = {
|
|
84
|
-
supportsColor: getSupportLevel,
|
|
85
|
-
stdout: getSupportLevel({ isTTY: tty.isatty(1) }),
|
|
86
|
-
stderr: getSupportLevel({ isTTY: tty.isatty(2) })
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
export {
|
|
92
|
-
require_has_flag,
|
|
93
|
-
require_supports_color
|
|
94
|
-
};
|
|
95
|
-
//# sourceMappingURL=chunk-3I3GQNEW.js.map
|
package/dist/chunk-57Q6OQG4.js
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
basename,
|
|
3
|
-
dirname,
|
|
4
|
-
extname,
|
|
5
|
-
isAbsolute,
|
|
6
|
-
join,
|
|
7
|
-
normalize,
|
|
8
|
-
relative,
|
|
9
|
-
resolve
|
|
10
|
-
} from "./chunk-CDBXAE2F.js";
|
|
11
|
-
import {
|
|
12
|
-
__commonJS,
|
|
13
|
-
__require,
|
|
14
|
-
__toESM,
|
|
15
|
-
init_cjs_shims
|
|
16
|
-
} from "./chunk-PKR7KJ6P.js";
|
|
17
|
-
|
|
18
|
-
// ../../node_modules/.pnpm/commondir@1.0.1/node_modules/commondir/index.js
|
|
19
|
-
var require_commondir = __commonJS({
|
|
20
|
-
"../../node_modules/.pnpm/commondir@1.0.1/node_modules/commondir/index.js"(exports, module) {
|
|
21
|
-
init_cjs_shims();
|
|
22
|
-
var path = __require("path");
|
|
23
|
-
module.exports = function(basedir, relfiles) {
|
|
24
|
-
if (relfiles)
|
|
25
|
-
var files = relfiles.map(function(r) {
|
|
26
|
-
return path.resolve(basedir, r);
|
|
27
|
-
});
|
|
28
|
-
else
|
|
29
|
-
var files = basedir;
|
|
30
|
-
var res = files.slice(1).reduce(function(ps, file) {
|
|
31
|
-
if (!file.match(/^([A-Za-z]:)?\/|\\/))
|
|
32
|
-
throw new Error("relative path without a basedir");
|
|
33
|
-
for (var xs = file.split(/\/+|\\+/), i = 0; ps[i] === xs[i] && i < Math.min(ps.length, xs.length); i++) ;
|
|
34
|
-
return ps.slice(0, i);
|
|
35
|
-
}, files[0].split(/\/+|\\+/));
|
|
36
|
-
return res.length > 1 ? res.join("/") : "/";
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
// ../cli-kit/dist/public/node/path.js
|
|
42
|
-
init_cjs_shims();
|
|
43
|
-
var import_commondir = __toESM(require_commondir());
|
|
44
|
-
import { fileURLToPath } from "url";
|
|
45
|
-
function joinPath(...paths) {
|
|
46
|
-
return join(...paths);
|
|
47
|
-
}
|
|
48
|
-
function normalizePath(path) {
|
|
49
|
-
return normalize(path);
|
|
50
|
-
}
|
|
51
|
-
function resolvePath(...paths) {
|
|
52
|
-
return resolve(...paths);
|
|
53
|
-
}
|
|
54
|
-
function relativePath(from, to) {
|
|
55
|
-
return relative(from, to);
|
|
56
|
-
}
|
|
57
|
-
function isAbsolutePath(path) {
|
|
58
|
-
return isAbsolute(path);
|
|
59
|
-
}
|
|
60
|
-
function dirname2(path) {
|
|
61
|
-
return dirname(path);
|
|
62
|
-
}
|
|
63
|
-
function basename2(path, ext) {
|
|
64
|
-
return basename(path, ext);
|
|
65
|
-
}
|
|
66
|
-
function extname2(path) {
|
|
67
|
-
return extname(path);
|
|
68
|
-
}
|
|
69
|
-
function relativizePath(path, dir = cwd()) {
|
|
70
|
-
let result = (0, import_commondir.default)([path, dir]), relativePath2 = relative(dir, path), relativeComponents = relativePath2.split("/").filter((component) => component === "..").length;
|
|
71
|
-
return result === "/" || relativePath2 === "" || relativeComponents > 2 ? path : relativePath2;
|
|
72
|
-
}
|
|
73
|
-
function isSubpath(mainPath, subpath) {
|
|
74
|
-
let relativePath2 = relative(mainPath, subpath);
|
|
75
|
-
return !relativePath2.startsWith("..") && !isAbsolutePath(relativePath2);
|
|
76
|
-
}
|
|
77
|
-
function moduleDirectory(moduleURL) {
|
|
78
|
-
return dirname2(fileURLToPath(moduleURL));
|
|
79
|
-
}
|
|
80
|
-
function cwd() {
|
|
81
|
-
return normalize(process.env.INIT_CWD ? process.env.INIT_CWD : process.cwd());
|
|
82
|
-
}
|
|
83
|
-
function sniffForPath(argv = process.argv) {
|
|
84
|
-
let pathFlagIndex = argv.indexOf("--path");
|
|
85
|
-
if (pathFlagIndex === -1)
|
|
86
|
-
return argv.find((arg) => arg.startsWith("--path="))?.split("=")[1];
|
|
87
|
-
let pathFlag = argv[pathFlagIndex + 1];
|
|
88
|
-
if (!(!pathFlag || pathFlag.startsWith("-")))
|
|
89
|
-
return pathFlag;
|
|
90
|
-
}
|
|
91
|
-
function sniffForJson(argv = process.argv) {
|
|
92
|
-
return argv.includes("--json") || argv.includes("-j");
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export {
|
|
96
|
-
joinPath,
|
|
97
|
-
normalizePath,
|
|
98
|
-
resolvePath,
|
|
99
|
-
relativePath,
|
|
100
|
-
isAbsolutePath,
|
|
101
|
-
dirname2 as dirname,
|
|
102
|
-
basename2 as basename,
|
|
103
|
-
extname2 as extname,
|
|
104
|
-
relativizePath,
|
|
105
|
-
isSubpath,
|
|
106
|
-
moduleDirectory,
|
|
107
|
-
cwd,
|
|
108
|
-
sniffForPath,
|
|
109
|
-
sniffForJson
|
|
110
|
-
};
|
|
111
|
-
//# sourceMappingURL=chunk-57Q6OQG4.js.map
|