@plasmicapp/nextjs-app-router 1.0.23 → 1.0.25
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.esm.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/react-server.esm.js.map +1 -1
- package/dist/react-server.js.map +1 -1
- package/dist/with-plasmic-prepass.cjs.js +137 -155
- package/package.json +9 -10
package/dist/index.esm.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/ExtractPlasmicQueryData.tsx"],
|
|
4
4
|
"sourcesContent": ["import { plasmicPrepassExtract } from \"@plasmicapp/prepass\";\nimport type { HeadMetadata } from \"@plasmicapp/query\";\nimport * as React from \"react\";\n\n/**\n * EXPERIMENTAL\n *\n * A component that serves the same purpose as extractPlasmicQueryData(), but from\n * React server components. This only works from frameworks that support\n * React.useId() and React.use() (like Next.js 13).\n *\n * The children of this component will be run through `extractPlasmicQueryData()`.\n */\nexport function ExtractPlasmicQueryData(props: { children?: React.ReactNode }) {\n const { children } = props;\n if (!(\"useId\" in React) || !(\"use\" in React)) {\n throw new Error(\n `You can only use <ExtractPlasmicQueryData /> from server components.`\n );\n }\n const scriptId = `plasmic-prefetch-${(React as any)[\"\" + \"useId\"]()}`;\n if (typeof window === \"undefined\") {\n const {\n queryData,\n headMetadata,\n }: { queryData: Record<string, any>; headMetadata: HeadMetadata } = (\n React as any\n )[\"\" + \"use\"](plasmicPrepassExtract(<>{children}</>));\n return (\n <>\n <script\n type=\"application/json\"\n dangerouslySetInnerHTML={{ __html: JSON.stringify(queryData) }}\n data-plasmic-prefetch-id={scriptId}\n suppressHydrationWarning={true}\n />\n {headMetadata && (\n <script\n type=\"application/json\"\n dangerouslySetInnerHTML={{\n __html: JSON.stringify(headMetadata),\n }}\n data-plasmic-head-metadata-id={scriptId}\n suppressHydrationWarning={true}\n />\n )}\n </>\n );\n } else {\n return null;\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;AAAA,SAAS,6BAA6B;AAEtC,YAAY,WAAW;AAWhB,SAAS,wBAAwB,OAAuC;AAC7E,QAAM,EAAE,SAAS,IAAI;AACrB,MAAI,EAAE,WAAW,UAAU,EAAE,SAAS,QAAQ;AAC5C,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,QAAM,WAAW,oBAAmC,eAAc;
|
|
5
|
+
"mappings": ";;;AAAA,SAAS,6BAA6B;AAEtC,YAAY,WAAW;AAWhB,SAAS,wBAAwB,OAAuC;AAC7E,QAAM,EAAE,SAAS,IAAI;AACrB,MAAI,EAAE,WAAW,UAAU,EAAE,SAAS,QAAQ;AAC5C,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,QAAM,WAAW,oBAAmC,eAAc,CAAC;AACnE,MAAI,OAAO,WAAW,aAAa;AACjC,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,IACF,IAEE,aAAY,sBAAsB,0DAAG,QAAS,CAAG,CAAC;AACpD,WACE,0DACE;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,yBAAyB,EAAE,QAAQ,KAAK,UAAU,SAAS,EAAE;AAAA,QAC7D,4BAA0B;AAAA,QAC1B,0BAA0B;AAAA;AAAA,IAC5B,GACC,gBACC;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,yBAAyB;AAAA,UACvB,QAAQ,KAAK,UAAU,YAAY;AAAA,QACrC;AAAA,QACA,iCAA+B;AAAA,QAC/B,0BAA0B;AAAA;AAAA,IAC5B,CAEJ;AAAA,EAEJ,OAAO;AACL,WAAO;AAAA,EACT;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/index.js
CHANGED
|
@@ -29,11 +29,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
30
|
|
|
31
31
|
// src/index.ts
|
|
32
|
-
var
|
|
33
|
-
__export(
|
|
32
|
+
var index_exports = {};
|
|
33
|
+
__export(index_exports, {
|
|
34
34
|
ExtractPlasmicQueryData: () => ExtractPlasmicQueryData
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
36
|
+
module.exports = __toCommonJS(index_exports);
|
|
37
37
|
|
|
38
38
|
// src/ExtractPlasmicQueryData.tsx
|
|
39
39
|
var import_prepass = require("@plasmicapp/prepass");
|
package/dist/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts", "../src/ExtractPlasmicQueryData.tsx"],
|
|
4
4
|
"sourcesContent": ["export * from \"./ExtractPlasmicQueryData\";\n", "import { plasmicPrepassExtract } from \"@plasmicapp/prepass\";\nimport type { HeadMetadata } from \"@plasmicapp/query\";\nimport * as React from \"react\";\n\n/**\n * EXPERIMENTAL\n *\n * A component that serves the same purpose as extractPlasmicQueryData(), but from\n * React server components. This only works from frameworks that support\n * React.useId() and React.use() (like Next.js 13).\n *\n * The children of this component will be run through `extractPlasmicQueryData()`.\n */\nexport function ExtractPlasmicQueryData(props: { children?: React.ReactNode }) {\n const { children } = props;\n if (!(\"useId\" in React) || !(\"use\" in React)) {\n throw new Error(\n `You can only use <ExtractPlasmicQueryData /> from server components.`\n );\n }\n const scriptId = `plasmic-prefetch-${(React as any)[\"\" + \"useId\"]()}`;\n if (typeof window === \"undefined\") {\n const {\n queryData,\n headMetadata,\n }: { queryData: Record<string, any>; headMetadata: HeadMetadata } = (\n React as any\n )[\"\" + \"use\"](plasmicPrepassExtract(<>{children}</>));\n return (\n <>\n <script\n type=\"application/json\"\n dangerouslySetInnerHTML={{ __html: JSON.stringify(queryData) }}\n data-plasmic-prefetch-id={scriptId}\n suppressHydrationWarning={true}\n />\n {headMetadata && (\n <script\n type=\"application/json\"\n dangerouslySetInnerHTML={{\n __html: JSON.stringify(headMetadata),\n }}\n data-plasmic-head-metadata-id={scriptId}\n suppressHydrationWarning={true}\n />\n )}\n </>\n );\n } else {\n return null;\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,qBAAsC;AAEtC,YAAuB;AAWhB,SAAS,wBAAwB,OAAuC;AAC7E,QAAM,EAAE,SAAS,IAAI;AACrB,MAAI,EAAE,WAAW,UAAU,EAAE,SAAS,QAAQ;AAC5C,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,QAAM,WAAW,oBAAmC,eAAc;
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,qBAAsC;AAEtC,YAAuB;AAWhB,SAAS,wBAAwB,OAAuC;AAC7E,QAAM,EAAE,SAAS,IAAI;AACrB,MAAI,EAAE,WAAW,UAAU,EAAE,SAAS,QAAQ;AAC5C,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,QAAM,WAAW,oBAAmC,eAAc,CAAC;AACnE,MAAI,OAAO,WAAW,aAAa;AACjC,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,IACF,IAEE,iBAAY,sCAAsB,0DAAG,QAAS,CAAG,CAAC;AACpD,WACE,0DACE;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,yBAAyB,EAAE,QAAQ,KAAK,UAAU,SAAS,EAAE;AAAA,QAC7D,4BAA0B;AAAA,QAC1B,0BAA0B;AAAA;AAAA,IAC5B,GACC,gBACC;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,yBAAyB;AAAA,UACvB,QAAQ,KAAK,UAAU,YAAY;AAAA,QACrC;AAAA,QACA,iCAA+B;AAAA,QAC/B,0BAA0B;AAAA;AAAA,IAC5B,CAEJ;AAAA,EAEJ,OAAO;AACL,WAAO;AAAA,EACT;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/extracted-data-fetcher.ts"],
|
|
4
4
|
"sourcesContent": ["import type { HeadMetadata } from \"@plasmicapp/query\";\nimport { parse as parseHtml } from \"node-html-parser\";\nimport { Metadata } from \"next\";\n\nexport async function fetchExtractedQueryData(url: string) {\n const res = await fetch(url);\n if (res.status !== 200) {\n return undefined;\n }\n\n const html = await res.text();\n const root = parseHtml(html);\n const script = root.querySelector(\"script[data-plasmic-prefetch-id]\");\n if (script) {\n return JSON.parse(script.innerHTML);\n }\n return undefined;\n}\n\nexport async function fetchExtractedHeadMetadata(\n url: string\n): Promise<HeadMetadata | undefined> {\n const res = await fetch(url);\n if (res.status !== 200) {\n return undefined;\n }\n\n const html = await res.text();\n const root = parseHtml(html);\n const script = root.querySelector(\"script[data-plasmic-head-metadata-id]\");\n if (script) {\n return JSON.parse(script.innerHTML);\n }\n return undefined;\n}\n\n/**\n * Helper function to extract Head metadata from Plasmic pages.\n *\n * Given current pathname + search params, returns an object compatible with\n * Next.js Metadata interface with SEO metadata.\n */\nexport async function withPlasmicMetadata({\n pathname,\n searchParams,\n}: {\n pathname: string;\n searchParams: Record<string, string | string[]> | undefined;\n}): Promise<object> {\n const isPlasmicSsr =\n !!searchParams?.[\"plasmicSsr\"] && searchParams?.[\"plasmicSsr\"] !== \"false\";\n\n if (isPlasmicSsr) {\n // We're building the metadata for SSR endpoint here; this endpoint is not\n // exposed for users, so we can just return an empty object.\n return {};\n }\n\n // Fetch the same page from SSR endpoint to retrieve Head metadata\n const prepassHost =\n process.env.PLASMIC_PREPASS_HOST ??\n (process.env.VERCEL_URL && `https://${process.env.VERCEL_URL}`) ??\n `http://localhost:${process.env.PORT ?? 3000}`;\n\n // Build a copy of the search params\n const newSearchParams = new URLSearchParams(\n Object.entries(searchParams ?? {}).flatMap(([key, values]) =>\n Array.isArray(values) ? values.map((v) => [key, v]) : [[key, values]]\n )\n );\n\n // Set `plasmicSsr` search param to indicate you are using the SSR endpoint.\n newSearchParams.set(\"plasmicSsr\", \"true\");\n\n if (process.env.VERCEL_AUTOMATION_BYPASS_SECRET) {\n // If protection bypass is enabled, use it to ensure fetching from\n // the SSR endpoint will not return the authentication page HTML\n newSearchParams.set(\n \"x-vercel-protection-bypass\",\n process.env.VERCEL_AUTOMATION_BYPASS_SECRET\n );\n }\n\n // Fetch and return the data from the endpoint using the new search params\n const prefetchedHeadMetadata = await fetchExtractedHeadMetadata(\n `${prepassHost}${pathname}?${newSearchParams.toString()}`\n );\n\n // Create metadata object\n const headMetadata: Metadata = {};\n if (\n prefetchedHeadMetadata &&\n Object.keys(prefetchedHeadMetadata).length > 0\n ) {\n if (prefetchedHeadMetadata.image) {\n headMetadata.twitter = {\n card: \"summary_large_image\",\n images: [prefetchedHeadMetadata.image],\n };\n headMetadata.openGraph = {\n images: [prefetchedHeadMetadata.image],\n };\n } else {\n headMetadata.twitter = {\n card: \"summary\",\n };\n headMetadata.openGraph = {};\n }\n if (prefetchedHeadMetadata.title) {\n headMetadata.title = prefetchedHeadMetadata.title;\n headMetadata.twitter.title = prefetchedHeadMetadata.title;\n headMetadata.openGraph.title = prefetchedHeadMetadata.title;\n }\n if (prefetchedHeadMetadata.description) {\n headMetadata.description = prefetchedHeadMetadata.description;\n headMetadata.twitter.description = prefetchedHeadMetadata.description;\n headMetadata.openGraph.description = prefetchedHeadMetadata.description;\n }\n if (prefetchedHeadMetadata.canonical) {\n headMetadata.alternates = {\n canonical: prefetchedHeadMetadata.canonical,\n };\n }\n }\n\n return headMetadata;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,SAAS,iBAAiB;AAGnC,SAAsB,wBAAwB,KAAa;AAAA;AACzD,UAAM,MAAM,MAAM,MAAM,GAAG;AAC3B,QAAI,IAAI,WAAW,KAAK;AACtB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SAAS,GAC7C;AACA,UAAI,uBAAuB,OAAO;AAChC,qBAAa,UAAU;AAAA,UACrB,MAAM;AAAA,UACN,QAAQ,CAAC,uBAAuB,KAAK;AAAA,QACvC;AACA,qBAAa,YAAY;AAAA,UACvB,QAAQ,CAAC,uBAAuB,KAAK;AAAA,QACvC;AAAA,MACF,OAAO;AACL,qBAAa,UAAU;AAAA,UACrB,MAAM;AAAA,QACR;AACA,qBAAa,YAAY,CAAC;AAAA,MAC5B;AACA,UAAI,uBAAuB,OAAO;AAChC,qBAAa,QAAQ,uBAAuB;AAC5C,qBAAa,QAAQ,QAAQ,uBAAuB;AACpD,qBAAa,UAAU,QAAQ,uBAAuB;AAAA,MACxD;AACA,UAAI,uBAAuB,aAAa;AACtC,qBAAa,cAAc,uBAAuB;AAClD,qBAAa,QAAQ,cAAc,uBAAuB;AAC1D,qBAAa,UAAU,cAAc,uBAAuB;AAAA,MAC9D;AACA,UAAI,uBAAuB,WAAW;AACpC,qBAAa,aAAa;AAAA,UACxB,WAAW,uBAAuB;AAAA,QACpC;AAAA,MACF;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/react-server.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/react-server.ts", "../src/extracted-data-fetcher.ts"],
|
|
4
4
|
"sourcesContent": ["export * from \"./extracted-data-fetcher\";\n", "import type { HeadMetadata } from \"@plasmicapp/query\";\nimport { parse as parseHtml } from \"node-html-parser\";\nimport { Metadata } from \"next\";\n\nexport async function fetchExtractedQueryData(url: string) {\n const res = await fetch(url);\n if (res.status !== 200) {\n return undefined;\n }\n\n const html = await res.text();\n const root = parseHtml(html);\n const script = root.querySelector(\"script[data-plasmic-prefetch-id]\");\n if (script) {\n return JSON.parse(script.innerHTML);\n }\n return undefined;\n}\n\nexport async function fetchExtractedHeadMetadata(\n url: string\n): Promise<HeadMetadata | undefined> {\n const res = await fetch(url);\n if (res.status !== 200) {\n return undefined;\n }\n\n const html = await res.text();\n const root = parseHtml(html);\n const script = root.querySelector(\"script[data-plasmic-head-metadata-id]\");\n if (script) {\n return JSON.parse(script.innerHTML);\n }\n return undefined;\n}\n\n/**\n * Helper function to extract Head metadata from Plasmic pages.\n *\n * Given current pathname + search params, returns an object compatible with\n * Next.js Metadata interface with SEO metadata.\n */\nexport async function withPlasmicMetadata({\n pathname,\n searchParams,\n}: {\n pathname: string;\n searchParams: Record<string, string | string[]> | undefined;\n}): Promise<object> {\n const isPlasmicSsr =\n !!searchParams?.[\"plasmicSsr\"] && searchParams?.[\"plasmicSsr\"] !== \"false\";\n\n if (isPlasmicSsr) {\n // We're building the metadata for SSR endpoint here; this endpoint is not\n // exposed for users, so we can just return an empty object.\n return {};\n }\n\n // Fetch the same page from SSR endpoint to retrieve Head metadata\n const prepassHost =\n process.env.PLASMIC_PREPASS_HOST ??\n (process.env.VERCEL_URL && `https://${process.env.VERCEL_URL}`) ??\n `http://localhost:${process.env.PORT ?? 3000}`;\n\n // Build a copy of the search params\n const newSearchParams = new URLSearchParams(\n Object.entries(searchParams ?? {}).flatMap(([key, values]) =>\n Array.isArray(values) ? values.map((v) => [key, v]) : [[key, values]]\n )\n );\n\n // Set `plasmicSsr` search param to indicate you are using the SSR endpoint.\n newSearchParams.set(\"plasmicSsr\", \"true\");\n\n if (process.env.VERCEL_AUTOMATION_BYPASS_SECRET) {\n // If protection bypass is enabled, use it to ensure fetching from\n // the SSR endpoint will not return the authentication page HTML\n newSearchParams.set(\n \"x-vercel-protection-bypass\",\n process.env.VERCEL_AUTOMATION_BYPASS_SECRET\n );\n }\n\n // Fetch and return the data from the endpoint using the new search params\n const prefetchedHeadMetadata = await fetchExtractedHeadMetadata(\n `${prepassHost}${pathname}?${newSearchParams.toString()}`\n );\n\n // Create metadata object\n const headMetadata: Metadata = {};\n if (\n prefetchedHeadMetadata &&\n Object.keys(prefetchedHeadMetadata).length > 0\n ) {\n if (prefetchedHeadMetadata.image) {\n headMetadata.twitter = {\n card: \"summary_large_image\",\n images: [prefetchedHeadMetadata.image],\n };\n headMetadata.openGraph = {\n images: [prefetchedHeadMetadata.image],\n };\n } else {\n headMetadata.twitter = {\n card: \"summary\",\n };\n headMetadata.openGraph = {};\n }\n if (prefetchedHeadMetadata.title) {\n headMetadata.title = prefetchedHeadMetadata.title;\n headMetadata.twitter.title = prefetchedHeadMetadata.title;\n headMetadata.openGraph.title = prefetchedHeadMetadata.title;\n }\n if (prefetchedHeadMetadata.description) {\n headMetadata.description = prefetchedHeadMetadata.description;\n headMetadata.twitter.description = prefetchedHeadMetadata.description;\n headMetadata.openGraph.description = prefetchedHeadMetadata.description;\n }\n if (prefetchedHeadMetadata.canonical) {\n headMetadata.alternates = {\n canonical: prefetchedHeadMetadata.canonical,\n };\n }\n }\n\n return headMetadata;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,8BAAmC;AAGnC,SAAsB,wBAAwB,KAAa;AAAA;AACzD,UAAM,MAAM,MAAM,MAAM,GAAG;AAC3B,QAAI,IAAI,WAAW,KAAK;AACtB,aAAO;AAAA,IACT;AAEA,UAAM,OAAO,MAAM,IAAI,KAAK;AAC5B,UAAM,WAAO,wBAAAA,OAAU,IAAI;AAC3B,UAAM,SAAS,KAAK,cAAc,kCAAkC;AACpE,QAAI,QAAQ;AACV,aAAO,KAAK,MAAM,OAAO,SAAS;AAAA,IACpC;AACA,WAAO;AAAA,EACT;AAAA;AAEA,SAAsB,2BACpB,KACmC;AAAA;AACnC,UAAM,MAAM,MAAM,MAAM,GAAG;AAC3B,QAAI,IAAI,WAAW,KAAK;AACtB,aAAO;AAAA,IACT;AAEA,UAAM,OAAO,MAAM,IAAI,KAAK;AAC5B,UAAM,WAAO,wBAAAA,OAAU,IAAI;AAC3B,UAAM,SAAS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5C,qBAAa,QAAQ,QAAQ,uBAAuB;AACpD,qBAAa,UAAU,QAAQ,uBAAuB;AAAA,MACxD;AACA,UAAI,uBAAuB,aAAa;AACtC,qBAAa,cAAc,uBAAuB;AAClD,qBAAa,QAAQ,cAAc,uBAAuB;AAC1D,qBAAa,UAAU,cAAc,uBAAuB;AAAA,MAC9D;AACA,UAAI,uBAAuB,WAAW;AACpC,qBAAa,aAAa;AAAA,UACxB,WAAW,uBAAuB;AAAA,QACpC;AAAA,MACF;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AAAA;",
|
|
6
6
|
"names": ["parseHtml"]
|
|
7
7
|
}
|
|
@@ -26,16 +26,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
|
|
29
|
-
// ../../node_modules/cross-port-killer/source/port-killer.js
|
|
29
|
+
// ../../node_modules/.pnpm/cross-port-killer@1.4.0/node_modules/cross-port-killer/source/port-killer.js
|
|
30
30
|
var require_port_killer = __commonJS({
|
|
31
|
-
"../../node_modules/cross-port-killer/source/port-killer.js"(
|
|
31
|
+
"../../node_modules/.pnpm/cross-port-killer@1.4.0/node_modules/cross-port-killer/source/port-killer.js"(exports2) {
|
|
32
32
|
"use strict";
|
|
33
|
-
Object.defineProperty(
|
|
34
|
-
|
|
33
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
34
|
+
exports2.Killer = void 0;
|
|
35
35
|
var child_process_1 = require("child_process");
|
|
36
36
|
var Killer = (
|
|
37
37
|
/** @class */
|
|
38
|
-
function() {
|
|
38
|
+
(function() {
|
|
39
39
|
function Killer2(platform) {
|
|
40
40
|
this.platforms = {
|
|
41
41
|
win32: { command: "Taskkill", args: ["/F", "/PID"] },
|
|
@@ -113,31 +113,31 @@ var require_port_killer = __commonJS({
|
|
|
113
113
|
resolver([]);
|
|
114
114
|
};
|
|
115
115
|
return Killer2;
|
|
116
|
-
}()
|
|
116
|
+
})()
|
|
117
117
|
);
|
|
118
|
-
|
|
118
|
+
exports2.Killer = Killer;
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
|
|
122
|
-
// ../../node_modules/cross-port-killer/source/index.js
|
|
122
|
+
// ../../node_modules/.pnpm/cross-port-killer@1.4.0/node_modules/cross-port-killer/source/index.js
|
|
123
123
|
var require_source = __commonJS({
|
|
124
|
-
"../../node_modules/cross-port-killer/source/index.js"(
|
|
124
|
+
"../../node_modules/.pnpm/cross-port-killer@1.4.0/node_modules/cross-port-killer/source/index.js"(exports2) {
|
|
125
125
|
"use strict";
|
|
126
|
-
Object.defineProperty(
|
|
127
|
-
|
|
126
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
127
|
+
exports2.kill = exports2.killer = void 0;
|
|
128
128
|
var port_killer_1 = require_port_killer();
|
|
129
|
-
|
|
129
|
+
exports2.killer = new port_killer_1.Killer(process.platform);
|
|
130
130
|
var kill2 = function(port) {
|
|
131
|
-
return
|
|
131
|
+
return exports2.killer.kill(port);
|
|
132
132
|
};
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
exports2.kill = kill2;
|
|
134
|
+
exports2.default = exports2.kill;
|
|
135
135
|
}
|
|
136
136
|
});
|
|
137
137
|
|
|
138
|
-
// ../../node_modules/isexe/windows.js
|
|
138
|
+
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
|
|
139
139
|
var require_windows = __commonJS({
|
|
140
|
-
"../../node_modules/isexe/windows.js"(
|
|
140
|
+
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports2, module2) {
|
|
141
141
|
module2.exports = isexe;
|
|
142
142
|
isexe.sync = sync;
|
|
143
143
|
var fs = require("fs");
|
|
@@ -175,9 +175,9 @@ var require_windows = __commonJS({
|
|
|
175
175
|
}
|
|
176
176
|
});
|
|
177
177
|
|
|
178
|
-
// ../../node_modules/isexe/mode.js
|
|
178
|
+
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
|
|
179
179
|
var require_mode = __commonJS({
|
|
180
|
-
"../../node_modules/isexe/mode.js"(
|
|
180
|
+
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports2, module2) {
|
|
181
181
|
module2.exports = isexe;
|
|
182
182
|
isexe.sync = sync;
|
|
183
183
|
var fs = require("fs");
|
|
@@ -208,9 +208,9 @@ var require_mode = __commonJS({
|
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
210
|
|
|
211
|
-
// ../../node_modules/isexe/index.js
|
|
211
|
+
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
212
212
|
var require_isexe = __commonJS({
|
|
213
|
-
"../../node_modules/isexe/index.js"(
|
|
213
|
+
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports2, module2) {
|
|
214
214
|
var fs = require("fs");
|
|
215
215
|
var core;
|
|
216
216
|
if (process.platform === "win32" || global.TESTING_WINDOWS) {
|
|
@@ -263,9 +263,9 @@ var require_isexe = __commonJS({
|
|
|
263
263
|
}
|
|
264
264
|
});
|
|
265
265
|
|
|
266
|
-
// ../../node_modules/
|
|
266
|
+
// ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
267
267
|
var require_which = __commonJS({
|
|
268
|
-
"../../node_modules/
|
|
268
|
+
"../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports2, module2) {
|
|
269
269
|
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
270
270
|
var path = require("path");
|
|
271
271
|
var COLON = isWindows ? ";" : ":";
|
|
@@ -359,9 +359,9 @@ var require_which = __commonJS({
|
|
|
359
359
|
}
|
|
360
360
|
});
|
|
361
361
|
|
|
362
|
-
// ../../node_modules/path-key/index.js
|
|
362
|
+
// ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
|
|
363
363
|
var require_path_key = __commonJS({
|
|
364
|
-
"../../node_modules/path-key/index.js"(
|
|
364
|
+
"../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports2, module2) {
|
|
365
365
|
"use strict";
|
|
366
366
|
var pathKey = (options = {}) => {
|
|
367
367
|
const environment = options.env || process.env;
|
|
@@ -376,9 +376,9 @@ var require_path_key = __commonJS({
|
|
|
376
376
|
}
|
|
377
377
|
});
|
|
378
378
|
|
|
379
|
-
// ../../node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
379
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
380
380
|
var require_resolveCommand = __commonJS({
|
|
381
|
-
"../../node_modules/cross-spawn/lib/util/resolveCommand.js"(
|
|
381
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
|
|
382
382
|
"use strict";
|
|
383
383
|
var path = require("path");
|
|
384
384
|
var which = require_which();
|
|
@@ -418,9 +418,9 @@ var require_resolveCommand = __commonJS({
|
|
|
418
418
|
}
|
|
419
419
|
});
|
|
420
420
|
|
|
421
|
-
// ../../node_modules/cross-spawn/lib/util/escape.js
|
|
421
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
|
|
422
422
|
var require_escape = __commonJS({
|
|
423
|
-
"../../node_modules/cross-spawn/lib/util/escape.js"(
|
|
423
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(exports2, module2) {
|
|
424
424
|
"use strict";
|
|
425
425
|
var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
426
426
|
function escapeCommand(arg) {
|
|
@@ -443,17 +443,17 @@ var require_escape = __commonJS({
|
|
|
443
443
|
}
|
|
444
444
|
});
|
|
445
445
|
|
|
446
|
-
// ../../node_modules/shebang-regex/index.js
|
|
446
|
+
// ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
|
|
447
447
|
var require_shebang_regex = __commonJS({
|
|
448
|
-
"../../node_modules/shebang-regex/index.js"(
|
|
448
|
+
"../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports2, module2) {
|
|
449
449
|
"use strict";
|
|
450
450
|
module2.exports = /^#!(.*)/;
|
|
451
451
|
}
|
|
452
452
|
});
|
|
453
453
|
|
|
454
|
-
// ../../node_modules/shebang-command/index.js
|
|
454
|
+
// ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
|
|
455
455
|
var require_shebang_command = __commonJS({
|
|
456
|
-
"../../node_modules/shebang-command/index.js"(
|
|
456
|
+
"../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports2, module2) {
|
|
457
457
|
"use strict";
|
|
458
458
|
var shebangRegex = require_shebang_regex();
|
|
459
459
|
module2.exports = (string = "") => {
|
|
@@ -471,9 +471,9 @@ var require_shebang_command = __commonJS({
|
|
|
471
471
|
}
|
|
472
472
|
});
|
|
473
473
|
|
|
474
|
-
// ../../node_modules/cross-spawn/lib/util/readShebang.js
|
|
474
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
|
475
475
|
var require_readShebang = __commonJS({
|
|
476
|
-
"../../node_modules/cross-spawn/lib/util/readShebang.js"(
|
|
476
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
|
|
477
477
|
"use strict";
|
|
478
478
|
var fs = require("fs");
|
|
479
479
|
var shebangCommand = require_shebang_command();
|
|
@@ -493,9 +493,9 @@ var require_readShebang = __commonJS({
|
|
|
493
493
|
}
|
|
494
494
|
});
|
|
495
495
|
|
|
496
|
-
// ../../node_modules/cross-spawn/lib/parse.js
|
|
496
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
|
497
497
|
var require_parse = __commonJS({
|
|
498
|
-
"../../node_modules/cross-spawn/lib/parse.js"(
|
|
498
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
|
|
499
499
|
"use strict";
|
|
500
500
|
var path = require("path");
|
|
501
501
|
var resolveCommand = require_resolveCommand();
|
|
@@ -555,9 +555,9 @@ var require_parse = __commonJS({
|
|
|
555
555
|
}
|
|
556
556
|
});
|
|
557
557
|
|
|
558
|
-
// ../../node_modules/cross-spawn/lib/enoent.js
|
|
558
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
|
|
559
559
|
var require_enoent = __commonJS({
|
|
560
|
-
"../../node_modules/cross-spawn/lib/enoent.js"(
|
|
560
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(exports2, module2) {
|
|
561
561
|
"use strict";
|
|
562
562
|
var isWin = process.platform === "win32";
|
|
563
563
|
function notFoundError(original, syscall) {
|
|
@@ -605,9 +605,9 @@ var require_enoent = __commonJS({
|
|
|
605
605
|
}
|
|
606
606
|
});
|
|
607
607
|
|
|
608
|
-
// ../../node_modules/cross-spawn/index.js
|
|
608
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
|
|
609
609
|
var require_cross_spawn = __commonJS({
|
|
610
|
-
"../../node_modules/cross-spawn/index.js"(
|
|
610
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports2, module2) {
|
|
611
611
|
"use strict";
|
|
612
612
|
var cp = require("child_process");
|
|
613
613
|
var parse = require_parse();
|
|
@@ -636,7 +636,7 @@ var require_cross_spawn = __commonJS({
|
|
|
636
636
|
var import_cross_port_killer = __toESM(require_source(), 1);
|
|
637
637
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
638
638
|
|
|
639
|
-
// node_modules/get-port/index.js
|
|
639
|
+
// ../../node_modules/.pnpm/get-port@7.2.0/node_modules/get-port/index.js
|
|
640
640
|
var import_node_net = __toESM(require("node:net"), 1);
|
|
641
641
|
var import_node_os = __toESM(require("node:os"), 1);
|
|
642
642
|
var Locked = class extends Error {
|
|
@@ -649,6 +649,7 @@ var lockedPorts = {
|
|
|
649
649
|
young: /* @__PURE__ */ new Set()
|
|
650
650
|
};
|
|
651
651
|
var releaseOldLockedPortsIntervalMs = 1e3 * 15;
|
|
652
|
+
var reservedPorts = /* @__PURE__ */ new Set();
|
|
652
653
|
var timeout;
|
|
653
654
|
var getLocalHosts = () => {
|
|
654
655
|
const interfaces = import_node_os.default.networkInterfaces();
|
|
@@ -686,6 +687,7 @@ var getAvailablePort = async (options, hosts) => {
|
|
|
686
687
|
}
|
|
687
688
|
return options.port;
|
|
688
689
|
};
|
|
690
|
+
var isLockedPort = (port) => lockedPorts.old.has(port) || lockedPorts.young.has(port) || reservedPorts.has(port);
|
|
689
691
|
var portCheckSequence = function* (ports) {
|
|
690
692
|
if (ports) {
|
|
691
693
|
yield* ports;
|
|
@@ -715,6 +717,7 @@ async function getPorts(options) {
|
|
|
715
717
|
exclude = new Set(excludeIterable);
|
|
716
718
|
}
|
|
717
719
|
}
|
|
720
|
+
const { reserve, ...netOptions } = options ?? {};
|
|
718
721
|
if (timeout === void 0) {
|
|
719
722
|
timeout = setTimeout(() => {
|
|
720
723
|
timeout = void 0;
|
|
@@ -731,14 +734,18 @@ async function getPorts(options) {
|
|
|
731
734
|
if (exclude.has(port)) {
|
|
732
735
|
continue;
|
|
733
736
|
}
|
|
734
|
-
let availablePort = await getAvailablePort({ ...
|
|
735
|
-
while (
|
|
737
|
+
let availablePort = await getAvailablePort({ ...netOptions, port }, hosts);
|
|
738
|
+
while (isLockedPort(availablePort)) {
|
|
736
739
|
if (port !== 0) {
|
|
737
740
|
throw new Locked(port);
|
|
738
741
|
}
|
|
739
|
-
availablePort = await getAvailablePort({ ...
|
|
742
|
+
availablePort = await getAvailablePort({ ...netOptions, port }, hosts);
|
|
743
|
+
}
|
|
744
|
+
if (reserve) {
|
|
745
|
+
reservedPorts.add(availablePort);
|
|
746
|
+
} else {
|
|
747
|
+
lockedPorts.young.add(availablePort);
|
|
740
748
|
}
|
|
741
|
-
lockedPorts.young.add(availablePort);
|
|
742
749
|
return availablePort;
|
|
743
750
|
} catch (error) {
|
|
744
751
|
if (!["EADDRINUSE", "EACCES"].includes(error.code) && !(error instanceof Locked)) {
|
|
@@ -752,10 +759,10 @@ async function getPorts(options) {
|
|
|
752
759
|
// src/with-dev-server.mts
|
|
753
760
|
var import_process = __toESM(require("process"), 1);
|
|
754
761
|
|
|
755
|
-
// ../../node_modules/yargs/lib/platform-shims/esm.mjs
|
|
762
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/lib/platform-shims/esm.mjs
|
|
756
763
|
var import_assert = require("assert");
|
|
757
764
|
|
|
758
|
-
// ../../node_modules/cliui/build/lib/index.js
|
|
765
|
+
// ../../node_modules/.pnpm/cliui@8.0.1/node_modules/cliui/build/lib/index.js
|
|
759
766
|
var align = {
|
|
760
767
|
right: alignRight,
|
|
761
768
|
center: alignCenter
|
|
@@ -1011,7 +1018,7 @@ function cliui(opts, _mixin) {
|
|
|
1011
1018
|
});
|
|
1012
1019
|
}
|
|
1013
1020
|
|
|
1014
|
-
// ../../node_modules/cliui/build/lib/string-utils.js
|
|
1021
|
+
// ../../node_modules/.pnpm/cliui@8.0.1/node_modules/cliui/build/lib/string-utils.js
|
|
1015
1022
|
var ansi = new RegExp("\x1B(?:\\[(?:\\d+[ABCDEFGJKSTm]|\\d+;\\d+[Hfm]|\\d+;\\d+;\\d+m|6n|s|u|\\?25[lh])|\\w)", "g");
|
|
1016
1023
|
function stripAnsi(str) {
|
|
1017
1024
|
return str.replace(ansi, "");
|
|
@@ -1032,7 +1039,7 @@ function wrap(str, width) {
|
|
|
1032
1039
|
return wrapped;
|
|
1033
1040
|
}
|
|
1034
1041
|
|
|
1035
|
-
// ../../node_modules/cliui/index.mjs
|
|
1042
|
+
// ../../node_modules/.pnpm/cliui@8.0.1/node_modules/cliui/index.mjs
|
|
1036
1043
|
function ui(opts) {
|
|
1037
1044
|
return cliui(opts, {
|
|
1038
1045
|
stringWidth: (str) => {
|
|
@@ -1043,7 +1050,7 @@ function ui(opts) {
|
|
|
1043
1050
|
});
|
|
1044
1051
|
}
|
|
1045
1052
|
|
|
1046
|
-
// ../../node_modules/escalade/sync/index.mjs
|
|
1053
|
+
// ../../node_modules/.pnpm/escalade@3.2.0/node_modules/escalade/sync/index.mjs
|
|
1047
1054
|
var import_path = require("path");
|
|
1048
1055
|
var import_fs = require("fs");
|
|
1049
1056
|
function sync_default(start, callback) {
|
|
@@ -1054,24 +1061,22 @@ function sync_default(start, callback) {
|
|
|
1054
1061
|
}
|
|
1055
1062
|
while (true) {
|
|
1056
1063
|
tmp = callback(dir, (0, import_fs.readdirSync)(dir));
|
|
1057
|
-
if (tmp)
|
|
1058
|
-
return (0, import_path.resolve)(dir, tmp);
|
|
1064
|
+
if (tmp) return (0, import_path.resolve)(dir, tmp);
|
|
1059
1065
|
dir = (0, import_path.dirname)(tmp = dir);
|
|
1060
|
-
if (tmp === dir)
|
|
1061
|
-
break;
|
|
1066
|
+
if (tmp === dir) break;
|
|
1062
1067
|
}
|
|
1063
1068
|
}
|
|
1064
1069
|
|
|
1065
|
-
// ../../node_modules/yargs/lib/platform-shims/esm.mjs
|
|
1070
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/lib/platform-shims/esm.mjs
|
|
1066
1071
|
var import_util3 = require("util");
|
|
1067
1072
|
var import_fs4 = require("fs");
|
|
1068
1073
|
var import_url = require("url");
|
|
1069
1074
|
|
|
1070
|
-
// ../../node_modules/yargs-parser/build/lib/index.js
|
|
1075
|
+
// ../../node_modules/.pnpm/yargs-parser@21.1.1/node_modules/yargs-parser/build/lib/index.js
|
|
1071
1076
|
var import_util = require("util");
|
|
1072
1077
|
var import_path2 = require("path");
|
|
1073
1078
|
|
|
1074
|
-
// ../../node_modules/yargs-parser/build/lib/string-utils.js
|
|
1079
|
+
// ../../node_modules/.pnpm/yargs-parser@21.1.1/node_modules/yargs-parser/build/lib/string-utils.js
|
|
1075
1080
|
function camelCase(str) {
|
|
1076
1081
|
const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase();
|
|
1077
1082
|
if (!isCamelCase) {
|
|
@@ -1125,7 +1130,7 @@ function looksLikeNumber(x) {
|
|
|
1125
1130
|
return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x);
|
|
1126
1131
|
}
|
|
1127
1132
|
|
|
1128
|
-
// ../../node_modules/yargs-parser/build/lib/tokenize-arg-string.js
|
|
1133
|
+
// ../../node_modules/.pnpm/yargs-parser@21.1.1/node_modules/yargs-parser/build/lib/tokenize-arg-string.js
|
|
1129
1134
|
function tokenizeArgString(argString) {
|
|
1130
1135
|
if (Array.isArray(argString)) {
|
|
1131
1136
|
return argString.map((e) => typeof e !== "string" ? e + "" : e);
|
|
@@ -1157,7 +1162,7 @@ function tokenizeArgString(argString) {
|
|
|
1157
1162
|
return args;
|
|
1158
1163
|
}
|
|
1159
1164
|
|
|
1160
|
-
// ../../node_modules/yargs-parser/build/lib/yargs-parser-types.js
|
|
1165
|
+
// ../../node_modules/.pnpm/yargs-parser@21.1.1/node_modules/yargs-parser/build/lib/yargs-parser-types.js
|
|
1161
1166
|
var DefaultValuesForTypeKey;
|
|
1162
1167
|
(function(DefaultValuesForTypeKey2) {
|
|
1163
1168
|
DefaultValuesForTypeKey2["BOOLEAN"] = "boolean";
|
|
@@ -1166,7 +1171,7 @@ var DefaultValuesForTypeKey;
|
|
|
1166
1171
|
DefaultValuesForTypeKey2["ARRAY"] = "array";
|
|
1167
1172
|
})(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {}));
|
|
1168
1173
|
|
|
1169
|
-
// ../../node_modules/yargs-parser/build/lib/yargs-parser.js
|
|
1174
|
+
// ../../node_modules/.pnpm/yargs-parser@21.1.1/node_modules/yargs-parser/build/lib/yargs-parser.js
|
|
1170
1175
|
var mixin2;
|
|
1171
1176
|
var YargsParser = class {
|
|
1172
1177
|
constructor(_mixin) {
|
|
@@ -2006,7 +2011,7 @@ function stripQuotes(val) {
|
|
|
2006
2011
|
return typeof val === "string" && (val[0] === "'" || val[0] === '"') && val[val.length - 1] === val[0] ? val.substring(1, val.length - 1) : val;
|
|
2007
2012
|
}
|
|
2008
2013
|
|
|
2009
|
-
// ../../node_modules/yargs-parser/build/lib/index.js
|
|
2014
|
+
// ../../node_modules/.pnpm/yargs-parser@21.1.1/node_modules/yargs-parser/build/lib/index.js
|
|
2010
2015
|
var import_fs2 = require("fs");
|
|
2011
2016
|
var _a;
|
|
2012
2017
|
var _b;
|
|
@@ -2052,10 +2057,10 @@ yargsParser.decamelize = decamelize;
|
|
|
2052
2057
|
yargsParser.looksLikeNumber = looksLikeNumber;
|
|
2053
2058
|
var lib_default = yargsParser;
|
|
2054
2059
|
|
|
2055
|
-
// ../../node_modules/yargs/lib/platform-shims/esm.mjs
|
|
2060
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/lib/platform-shims/esm.mjs
|
|
2056
2061
|
var import_path4 = require("path");
|
|
2057
2062
|
|
|
2058
|
-
// ../../node_modules/yargs/build/lib/utils/process-argv.js
|
|
2063
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/build/lib/utils/process-argv.js
|
|
2059
2064
|
function getProcessArgvBinIndex() {
|
|
2060
2065
|
if (isBundledElectronApp())
|
|
2061
2066
|
return 0;
|
|
@@ -2074,18 +2079,18 @@ function getProcessArgvBin() {
|
|
|
2074
2079
|
return process.argv[getProcessArgvBinIndex()];
|
|
2075
2080
|
}
|
|
2076
2081
|
|
|
2077
|
-
// ../../node_modules/yargs/build/lib/yerror.js
|
|
2078
|
-
var YError = class extends Error {
|
|
2082
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/build/lib/yerror.js
|
|
2083
|
+
var YError = class _YError extends Error {
|
|
2079
2084
|
constructor(msg) {
|
|
2080
2085
|
super(msg || "yargs error");
|
|
2081
2086
|
this.name = "YError";
|
|
2082
2087
|
if (Error.captureStackTrace) {
|
|
2083
|
-
Error.captureStackTrace(this,
|
|
2088
|
+
Error.captureStackTrace(this, _YError);
|
|
2084
2089
|
}
|
|
2085
2090
|
}
|
|
2086
2091
|
};
|
|
2087
2092
|
|
|
2088
|
-
// ../../node_modules/y18n/build/lib/platform-shims/node.js
|
|
2093
|
+
// ../../node_modules/.pnpm/y18n@5.0.8/node_modules/y18n/build/lib/platform-shims/node.js
|
|
2089
2094
|
var import_fs3 = require("fs");
|
|
2090
2095
|
var import_util2 = require("util");
|
|
2091
2096
|
var import_path3 = require("path");
|
|
@@ -2105,7 +2110,7 @@ var node_default = {
|
|
|
2105
2110
|
}
|
|
2106
2111
|
};
|
|
2107
2112
|
|
|
2108
|
-
// ../../node_modules/y18n/build/lib/index.js
|
|
2113
|
+
// ../../node_modules/.pnpm/y18n@5.0.8/node_modules/y18n/build/lib/index.js
|
|
2109
2114
|
var shim;
|
|
2110
2115
|
var Y18N = class {
|
|
2111
2116
|
constructor(opts) {
|
|
@@ -2266,13 +2271,13 @@ function y18n(opts, _shim) {
|
|
|
2266
2271
|
};
|
|
2267
2272
|
}
|
|
2268
2273
|
|
|
2269
|
-
// ../../node_modules/y18n/index.mjs
|
|
2274
|
+
// ../../node_modules/.pnpm/y18n@5.0.8/node_modules/y18n/index.mjs
|
|
2270
2275
|
var y18n2 = (opts) => {
|
|
2271
2276
|
return y18n(opts, node_default);
|
|
2272
2277
|
};
|
|
2273
2278
|
var y18n_default = y18n2;
|
|
2274
2279
|
|
|
2275
|
-
// ../../node_modules/yargs/lib/platform-shims/esm.mjs
|
|
2280
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/lib/platform-shims/esm.mjs
|
|
2276
2281
|
var import_meta = {};
|
|
2277
2282
|
var REQUIRE_ERROR = "require is not supported by ESM";
|
|
2278
2283
|
var REQUIRE_DIRECTORY_ERROR = "loading a directory of commands is not supported yet for ESM";
|
|
@@ -2332,7 +2337,7 @@ var esm_default = {
|
|
|
2332
2337
|
})
|
|
2333
2338
|
};
|
|
2334
2339
|
|
|
2335
|
-
// ../../node_modules/yargs/build/lib/typings/common-types.js
|
|
2340
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/build/lib/typings/common-types.js
|
|
2336
2341
|
function assertNotStrictEqual(actual, expected, shim3, message) {
|
|
2337
2342
|
shim3.assert.notStrictEqual(actual, expected, message);
|
|
2338
2343
|
}
|
|
@@ -2343,12 +2348,12 @@ function objectKeys(object) {
|
|
|
2343
2348
|
return Object.keys(object);
|
|
2344
2349
|
}
|
|
2345
2350
|
|
|
2346
|
-
// ../../node_modules/yargs/build/lib/utils/is-promise.js
|
|
2351
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/build/lib/utils/is-promise.js
|
|
2347
2352
|
function isPromise(maybePromise) {
|
|
2348
2353
|
return !!maybePromise && !!maybePromise.then && typeof maybePromise.then === "function";
|
|
2349
2354
|
}
|
|
2350
2355
|
|
|
2351
|
-
// ../../node_modules/yargs/build/lib/parse-command.js
|
|
2356
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/build/lib/parse-command.js
|
|
2352
2357
|
function parseCommand(cmd) {
|
|
2353
2358
|
const extraSpacesStrippedCommand = cmd.replace(/\s{2,}/g, " ");
|
|
2354
2359
|
const splitCommand = extraSpacesStrippedCommand.split(/\s+(?![^[]*]|[^<]*>)/);
|
|
@@ -2381,7 +2386,7 @@ function parseCommand(cmd) {
|
|
|
2381
2386
|
return parsedCommand;
|
|
2382
2387
|
}
|
|
2383
2388
|
|
|
2384
|
-
// ../../node_modules/yargs/build/lib/argsert.js
|
|
2389
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/build/lib/argsert.js
|
|
2385
2390
|
var positionName = ["first", "second", "third", "fourth", "fifth", "sixth"];
|
|
2386
2391
|
function argsert(arg1, arg2, arg3) {
|
|
2387
2392
|
function parseArgs() {
|
|
@@ -2439,7 +2444,7 @@ function argumentTypeError(observedType, allowedTypes, position) {
|
|
|
2439
2444
|
throw new YError(`Invalid ${positionName[position] || "manyith"} argument. Expected ${allowedTypes.join(" or ")} but received ${observedType}.`);
|
|
2440
2445
|
}
|
|
2441
2446
|
|
|
2442
|
-
// ../../node_modules/yargs/build/lib/middleware.js
|
|
2447
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/build/lib/middleware.js
|
|
2443
2448
|
var GlobalMiddleware = class {
|
|
2444
2449
|
constructor(yargs) {
|
|
2445
2450
|
this.globalMiddleware = [];
|
|
@@ -2521,7 +2526,7 @@ function applyMiddleware(argv, yargs, middlewares, beforeValidation) {
|
|
|
2521
2526
|
}, argv);
|
|
2522
2527
|
}
|
|
2523
2528
|
|
|
2524
|
-
// ../../node_modules/yargs/build/lib/utils/maybe-async-result.js
|
|
2529
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/build/lib/utils/maybe-async-result.js
|
|
2525
2530
|
function maybeAsyncResult(getResult, resultHandler, errorHandler = (err) => {
|
|
2526
2531
|
throw err;
|
|
2527
2532
|
}) {
|
|
@@ -2536,7 +2541,7 @@ function isFunction(arg) {
|
|
|
2536
2541
|
return typeof arg === "function";
|
|
2537
2542
|
}
|
|
2538
2543
|
|
|
2539
|
-
// ../../node_modules/yargs/build/lib/utils/which-module.js
|
|
2544
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/build/lib/utils/which-module.js
|
|
2540
2545
|
function whichModule(exported) {
|
|
2541
2546
|
if (typeof require === "undefined")
|
|
2542
2547
|
return null;
|
|
@@ -2548,7 +2553,7 @@ function whichModule(exported) {
|
|
|
2548
2553
|
return null;
|
|
2549
2554
|
}
|
|
2550
2555
|
|
|
2551
|
-
// ../../node_modules/yargs/build/lib/command.js
|
|
2556
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/build/lib/command.js
|
|
2552
2557
|
var DEFAULT_MARKER = /(^\*)|(^\$0)/;
|
|
2553
2558
|
var CommandInstance = class {
|
|
2554
2559
|
constructor(usage2, validation2, globalMiddleware, shim3) {
|
|
@@ -2940,7 +2945,7 @@ function isCommandHandlerDefinition(cmd) {
|
|
|
2940
2945
|
return typeof cmd === "object" && !Array.isArray(cmd);
|
|
2941
2946
|
}
|
|
2942
2947
|
|
|
2943
|
-
// ../../node_modules/yargs/build/lib/utils/obj-filter.js
|
|
2948
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/build/lib/utils/obj-filter.js
|
|
2944
2949
|
function objFilter(original = {}, filter = () => true) {
|
|
2945
2950
|
const obj = {};
|
|
2946
2951
|
objectKeys(original).forEach((key) => {
|
|
@@ -2951,7 +2956,7 @@ function objFilter(original = {}, filter = () => true) {
|
|
|
2951
2956
|
return obj;
|
|
2952
2957
|
}
|
|
2953
2958
|
|
|
2954
|
-
// ../../node_modules/yargs/build/lib/utils/set-blocking.js
|
|
2959
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/build/lib/utils/set-blocking.js
|
|
2955
2960
|
function setBlocking(blocking) {
|
|
2956
2961
|
if (typeof process === "undefined")
|
|
2957
2962
|
return;
|
|
@@ -2963,7 +2968,7 @@ function setBlocking(blocking) {
|
|
|
2963
2968
|
});
|
|
2964
2969
|
}
|
|
2965
2970
|
|
|
2966
|
-
// ../../node_modules/yargs/build/lib/usage.js
|
|
2971
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/build/lib/usage.js
|
|
2967
2972
|
function isBoolean(fail) {
|
|
2968
2973
|
return typeof fail === "boolean";
|
|
2969
2974
|
}
|
|
@@ -3489,7 +3494,7 @@ function getText(text) {
|
|
|
3489
3494
|
return isIndentedText(text) ? text.text : text;
|
|
3490
3495
|
}
|
|
3491
3496
|
|
|
3492
|
-
// ../../node_modules/yargs/build/lib/completion-templates.js
|
|
3497
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/build/lib/completion-templates.js
|
|
3493
3498
|
var completionShTemplate = `###-begin-{{app_name}}-completions-###
|
|
3494
3499
|
#
|
|
3495
3500
|
# yargs command completion script
|
|
@@ -3540,7 +3545,7 @@ compdef _{{app_name}}_yargs_completions {{app_name}}
|
|
|
3540
3545
|
###-end-{{app_name}}-completions-###
|
|
3541
3546
|
`;
|
|
3542
3547
|
|
|
3543
|
-
// ../../node_modules/yargs/build/lib/completion.js
|
|
3548
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/build/lib/completion.js
|
|
3544
3549
|
var Completion = class {
|
|
3545
3550
|
constructor(yargs, usage2, command2, shim3) {
|
|
3546
3551
|
var _a2, _b2, _c2;
|
|
@@ -3753,7 +3758,7 @@ function isFallbackCompletionFunction(completionFunction) {
|
|
|
3753
3758
|
return completionFunction.length > 3;
|
|
3754
3759
|
}
|
|
3755
3760
|
|
|
3756
|
-
// ../../node_modules/yargs/build/lib/utils/levenshtein.js
|
|
3761
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/build/lib/utils/levenshtein.js
|
|
3757
3762
|
function levenshtein(a, b) {
|
|
3758
3763
|
if (a.length === 0)
|
|
3759
3764
|
return b.length;
|
|
@@ -3784,7 +3789,7 @@ function levenshtein(a, b) {
|
|
|
3784
3789
|
return matrix[b.length][a.length];
|
|
3785
3790
|
}
|
|
3786
3791
|
|
|
3787
|
-
// ../../node_modules/yargs/build/lib/validation.js
|
|
3792
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/build/lib/validation.js
|
|
3788
3793
|
var specialKeys = ["$0", "--", "_"];
|
|
3789
3794
|
function validation(yargs, usage2, shim3) {
|
|
3790
3795
|
const __ = shim3.y18n.__;
|
|
@@ -4053,7 +4058,7 @@ ${customMsgs.join("\n")}` : "";
|
|
|
4053
4058
|
return self;
|
|
4054
4059
|
}
|
|
4055
4060
|
|
|
4056
|
-
// ../../node_modules/yargs/build/lib/utils/apply-extends.js
|
|
4061
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/build/lib/utils/apply-extends.js
|
|
4057
4062
|
var previouslyVisitedConfigs = [];
|
|
4058
4063
|
var shim2;
|
|
4059
4064
|
function applyExtends(config, cwd, mergeExtends, _shim) {
|
|
@@ -4106,21 +4111,16 @@ function mergeDeep(config1, config2) {
|
|
|
4106
4111
|
return target;
|
|
4107
4112
|
}
|
|
4108
4113
|
|
|
4109
|
-
// ../../node_modules/yargs/build/lib/yargs-factory.js
|
|
4114
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/build/lib/yargs-factory.js
|
|
4110
4115
|
var __classPrivateFieldSet = function(receiver, state, value, kind, f) {
|
|
4111
|
-
if (kind === "m")
|
|
4112
|
-
|
|
4113
|
-
if (
|
|
4114
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
4115
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
4116
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
4116
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4117
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4118
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
4117
4119
|
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
4118
4120
|
};
|
|
4119
4121
|
var __classPrivateFieldGet = function(receiver, state, kind, f) {
|
|
4120
|
-
if (kind === "a" && !f)
|
|
4121
|
-
|
|
4122
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
4123
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4122
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4123
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4124
4124
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
4125
4125
|
};
|
|
4126
4126
|
var _YargsInstance_command;
|
|
@@ -4172,42 +4172,42 @@ function YargsFactory(_shim) {
|
|
|
4172
4172
|
return yargs;
|
|
4173
4173
|
};
|
|
4174
4174
|
}
|
|
4175
|
-
var kCopyDoubleDash = Symbol("copyDoubleDash");
|
|
4176
|
-
var kCreateLogger = Symbol("copyDoubleDash");
|
|
4177
|
-
var kDeleteFromParserHintObject = Symbol("deleteFromParserHintObject");
|
|
4178
|
-
var kEmitWarning = Symbol("emitWarning");
|
|
4179
|
-
var kFreeze = Symbol("freeze");
|
|
4180
|
-
var kGetDollarZero = Symbol("getDollarZero");
|
|
4181
|
-
var kGetParserConfiguration = Symbol("getParserConfiguration");
|
|
4182
|
-
var kGetUsageConfiguration = Symbol("getUsageConfiguration");
|
|
4183
|
-
var kGuessLocale = Symbol("guessLocale");
|
|
4184
|
-
var kGuessVersion = Symbol("guessVersion");
|
|
4185
|
-
var kParsePositionalNumbers = Symbol("parsePositionalNumbers");
|
|
4186
|
-
var kPkgUp = Symbol("pkgUp");
|
|
4187
|
-
var kPopulateParserHintArray = Symbol("populateParserHintArray");
|
|
4188
|
-
var kPopulateParserHintSingleValueDictionary = Symbol("populateParserHintSingleValueDictionary");
|
|
4189
|
-
var kPopulateParserHintArrayDictionary = Symbol("populateParserHintArrayDictionary");
|
|
4190
|
-
var kPopulateParserHintDictionary = Symbol("populateParserHintDictionary");
|
|
4191
|
-
var kSanitizeKey = Symbol("sanitizeKey");
|
|
4192
|
-
var kSetKey = Symbol("setKey");
|
|
4193
|
-
var kUnfreeze = Symbol("unfreeze");
|
|
4194
|
-
var kValidateAsync = Symbol("validateAsync");
|
|
4195
|
-
var kGetCommandInstance = Symbol("getCommandInstance");
|
|
4196
|
-
var kGetContext = Symbol("getContext");
|
|
4197
|
-
var kGetHasOutput = Symbol("getHasOutput");
|
|
4198
|
-
var kGetLoggerInstance = Symbol("getLoggerInstance");
|
|
4199
|
-
var kGetParseContext = Symbol("getParseContext");
|
|
4200
|
-
var kGetUsageInstance = Symbol("getUsageInstance");
|
|
4201
|
-
var kGetValidationInstance = Symbol("getValidationInstance");
|
|
4202
|
-
var kHasParseCallback = Symbol("hasParseCallback");
|
|
4203
|
-
var kIsGlobalContext = Symbol("isGlobalContext");
|
|
4204
|
-
var kPostProcess = Symbol("postProcess");
|
|
4205
|
-
var kRebase = Symbol("rebase");
|
|
4206
|
-
var kReset = Symbol("reset");
|
|
4207
|
-
var kRunYargsParserAndExecuteCommands = Symbol("runYargsParserAndExecuteCommands");
|
|
4208
|
-
var kRunValidation = Symbol("runValidation");
|
|
4209
|
-
var kSetHasOutput = Symbol("setHasOutput");
|
|
4210
|
-
var kTrackManuallySetKeys = Symbol("kTrackManuallySetKeys");
|
|
4175
|
+
var kCopyDoubleDash = /* @__PURE__ */ Symbol("copyDoubleDash");
|
|
4176
|
+
var kCreateLogger = /* @__PURE__ */ Symbol("copyDoubleDash");
|
|
4177
|
+
var kDeleteFromParserHintObject = /* @__PURE__ */ Symbol("deleteFromParserHintObject");
|
|
4178
|
+
var kEmitWarning = /* @__PURE__ */ Symbol("emitWarning");
|
|
4179
|
+
var kFreeze = /* @__PURE__ */ Symbol("freeze");
|
|
4180
|
+
var kGetDollarZero = /* @__PURE__ */ Symbol("getDollarZero");
|
|
4181
|
+
var kGetParserConfiguration = /* @__PURE__ */ Symbol("getParserConfiguration");
|
|
4182
|
+
var kGetUsageConfiguration = /* @__PURE__ */ Symbol("getUsageConfiguration");
|
|
4183
|
+
var kGuessLocale = /* @__PURE__ */ Symbol("guessLocale");
|
|
4184
|
+
var kGuessVersion = /* @__PURE__ */ Symbol("guessVersion");
|
|
4185
|
+
var kParsePositionalNumbers = /* @__PURE__ */ Symbol("parsePositionalNumbers");
|
|
4186
|
+
var kPkgUp = /* @__PURE__ */ Symbol("pkgUp");
|
|
4187
|
+
var kPopulateParserHintArray = /* @__PURE__ */ Symbol("populateParserHintArray");
|
|
4188
|
+
var kPopulateParserHintSingleValueDictionary = /* @__PURE__ */ Symbol("populateParserHintSingleValueDictionary");
|
|
4189
|
+
var kPopulateParserHintArrayDictionary = /* @__PURE__ */ Symbol("populateParserHintArrayDictionary");
|
|
4190
|
+
var kPopulateParserHintDictionary = /* @__PURE__ */ Symbol("populateParserHintDictionary");
|
|
4191
|
+
var kSanitizeKey = /* @__PURE__ */ Symbol("sanitizeKey");
|
|
4192
|
+
var kSetKey = /* @__PURE__ */ Symbol("setKey");
|
|
4193
|
+
var kUnfreeze = /* @__PURE__ */ Symbol("unfreeze");
|
|
4194
|
+
var kValidateAsync = /* @__PURE__ */ Symbol("validateAsync");
|
|
4195
|
+
var kGetCommandInstance = /* @__PURE__ */ Symbol("getCommandInstance");
|
|
4196
|
+
var kGetContext = /* @__PURE__ */ Symbol("getContext");
|
|
4197
|
+
var kGetHasOutput = /* @__PURE__ */ Symbol("getHasOutput");
|
|
4198
|
+
var kGetLoggerInstance = /* @__PURE__ */ Symbol("getLoggerInstance");
|
|
4199
|
+
var kGetParseContext = /* @__PURE__ */ Symbol("getParseContext");
|
|
4200
|
+
var kGetUsageInstance = /* @__PURE__ */ Symbol("getUsageInstance");
|
|
4201
|
+
var kGetValidationInstance = /* @__PURE__ */ Symbol("getValidationInstance");
|
|
4202
|
+
var kHasParseCallback = /* @__PURE__ */ Symbol("hasParseCallback");
|
|
4203
|
+
var kIsGlobalContext = /* @__PURE__ */ Symbol("isGlobalContext");
|
|
4204
|
+
var kPostProcess = /* @__PURE__ */ Symbol("postProcess");
|
|
4205
|
+
var kRebase = /* @__PURE__ */ Symbol("rebase");
|
|
4206
|
+
var kReset = /* @__PURE__ */ Symbol("reset");
|
|
4207
|
+
var kRunYargsParserAndExecuteCommands = /* @__PURE__ */ Symbol("runYargsParserAndExecuteCommands");
|
|
4208
|
+
var kRunValidation = /* @__PURE__ */ Symbol("runValidation");
|
|
4209
|
+
var kSetHasOutput = /* @__PURE__ */ Symbol("setHasOutput");
|
|
4210
|
+
var kTrackManuallySetKeys = /* @__PURE__ */ Symbol("kTrackManuallySetKeys");
|
|
4211
4211
|
var YargsInstance = class {
|
|
4212
4212
|
constructor(processArgs = [], cwd, parentRequire, shim3) {
|
|
4213
4213
|
this.customScriptName = false;
|
|
@@ -5105,7 +5105,7 @@ var YargsInstance = class {
|
|
|
5105
5105
|
}
|
|
5106
5106
|
[kDeleteFromParserHintObject](optionKey) {
|
|
5107
5107
|
objectKeys(__classPrivateFieldGet(this, _YargsInstance_options, "f")).forEach((hintKey) => {
|
|
5108
|
-
if (((key) => key === "configObjects")(hintKey))
|
|
5108
|
+
if (/* @__PURE__ */ ((key) => key === "configObjects")(hintKey))
|
|
5109
5109
|
return;
|
|
5110
5110
|
const hint = __classPrivateFieldGet(this, _YargsInstance_options, "f")[hintKey];
|
|
5111
5111
|
if (Array.isArray(hint)) {
|
|
@@ -5233,7 +5233,7 @@ var YargsInstance = class {
|
|
|
5233
5233
|
key.forEach((k) => {
|
|
5234
5234
|
builder(k, value);
|
|
5235
5235
|
});
|
|
5236
|
-
} else if (((key2) => typeof key2 === "object")(key)) {
|
|
5236
|
+
} else if (/* @__PURE__ */ ((key2) => typeof key2 === "object")(key)) {
|
|
5237
5237
|
for (const k of objectKeys(key)) {
|
|
5238
5238
|
builder(k, key[k]);
|
|
5239
5239
|
}
|
|
@@ -5605,7 +5605,7 @@ function isYargsInstance(y) {
|
|
|
5605
5605
|
return !!y && typeof y.getInternalMethods === "function";
|
|
5606
5606
|
}
|
|
5607
5607
|
|
|
5608
|
-
// ../../node_modules/yargs/index.mjs
|
|
5608
|
+
// ../../node_modules/.pnpm/yargs@17.7.3/node_modules/yargs/index.mjs
|
|
5609
5609
|
var Yargs = YargsFactory(esm_default);
|
|
5610
5610
|
var yargs_default = Yargs;
|
|
5611
5611
|
|
|
@@ -5696,26 +5696,8 @@ if (require.main === module) {
|
|
|
5696
5696
|
/*! Bundled license information:
|
|
5697
5697
|
|
|
5698
5698
|
yargs-parser/build/lib/string-utils.js:
|
|
5699
|
-
(**
|
|
5700
|
-
* @license
|
|
5701
|
-
* Copyright (c) 2016, Contributors
|
|
5702
|
-
* SPDX-License-Identifier: ISC
|
|
5703
|
-
*)
|
|
5704
|
-
|
|
5705
5699
|
yargs-parser/build/lib/tokenize-arg-string.js:
|
|
5706
|
-
(**
|
|
5707
|
-
* @license
|
|
5708
|
-
* Copyright (c) 2016, Contributors
|
|
5709
|
-
* SPDX-License-Identifier: ISC
|
|
5710
|
-
*)
|
|
5711
|
-
|
|
5712
5700
|
yargs-parser/build/lib/yargs-parser-types.js:
|
|
5713
|
-
(**
|
|
5714
|
-
* @license
|
|
5715
|
-
* Copyright (c) 2016, Contributors
|
|
5716
|
-
* SPDX-License-Identifier: ISC
|
|
5717
|
-
*)
|
|
5718
|
-
|
|
5719
5701
|
yargs-parser/build/lib/yargs-parser.js:
|
|
5720
5702
|
(**
|
|
5721
5703
|
* @license
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plasmicapp/nextjs-app-router",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.25",
|
|
4
4
|
"types": "./dist/index.d.ts",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -14,19 +14,18 @@
|
|
|
14
14
|
"node": ">=16"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
|
-
"build": "
|
|
18
|
-
"build:types": "
|
|
17
|
+
"build": "pnpm build:types && pnpm build:index && pnpm build:react-server && pnpm build:with-dev-server",
|
|
18
|
+
"build:types": "tsc",
|
|
19
19
|
"build:index": "node ../../build.mjs ./src/index.ts --use-client",
|
|
20
20
|
"build:with-dev-server": "esbuild --format=cjs --target=node18 --bundle --outfile=./dist/with-plasmic-prepass.cjs.js --platform=node ./src/with-dev-server.mts",
|
|
21
21
|
"build:react-server": "node ../../build.mjs ./src/react-server.ts",
|
|
22
|
-
"test": "
|
|
23
|
-
"coverage": "
|
|
24
|
-
"lint": "eslint"
|
|
25
|
-
"prepare": "if-env PREPARE_NO_BUILD=true || yarn build"
|
|
22
|
+
"test": "pnpm -w test",
|
|
23
|
+
"coverage": "pnpm -w test --coverage --passWithNoTests",
|
|
24
|
+
"lint": "eslint"
|
|
26
25
|
},
|
|
27
26
|
"dependencies": {
|
|
28
|
-
"@plasmicapp/prepass": "1.0.
|
|
29
|
-
"@plasmicapp/query": "0.1.
|
|
27
|
+
"@plasmicapp/prepass": "1.0.25",
|
|
28
|
+
"@plasmicapp/query": "0.1.85",
|
|
30
29
|
"cross-port-killer": "1.4.0",
|
|
31
30
|
"cross-spawn": "^7.0.3",
|
|
32
31
|
"get-port": "^7.0.0",
|
|
@@ -74,5 +73,5 @@
|
|
|
74
73
|
"react": "^18.2.0",
|
|
75
74
|
"typescript": "^5.2.2"
|
|
76
75
|
},
|
|
77
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "ff7171136453b094d87c56ff90e078d930f99b29"
|
|
78
77
|
}
|