@hedystia/astro 2.3.18 → 2.3.20

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.cjs CHANGED
@@ -2,11 +2,6 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
6
- let node_fs = require("node:fs");
7
- node_fs = require_runtime.__toESM(node_fs);
8
- let node_path = require("node:path");
9
- node_path = require_runtime.__toESM(node_path);
10
5
  let _hedystia_view_vite = require("@hedystia/view/vite");
11
6
  //#region src/index.ts
12
7
  function getRenderer() {
@@ -17,47 +12,17 @@ function getRenderer() {
17
12
  };
18
13
  }
19
14
  function src_default(options = {}) {
20
- const { plugins, collectedCSS } = (0, _hedystia_view_vite.viewPlugin)(options);
15
+ const { plugins } = (0, _hedystia_view_vite.viewPlugin)(options);
21
16
  return {
22
17
  name: "@hedystia/astro",
23
- hooks: {
24
- "astro:config:setup": async ({ addRenderer, updateConfig }) => {
25
- addRenderer(getRenderer());
26
- updateConfig({ vite: {
27
- plugins: [...plugins, configEnvironmentPlugin()],
28
- ssr: { noExternal: ["@hedystia/view"] }
29
- } });
30
- },
31
- "astro:build:done": async ({ dir }) => {
32
- if (collectedCSS.size > 0) {
33
- const css = Array.from(collectedCSS.values()).join("\n");
34
- injectCSSIntoHTML(dir.pathname, css);
35
- }
36
- }
37
- }
38
- };
39
- }
40
- function injectCSSIntoHTML(dir, css) {
41
- const styleTag = `<style data-hedystia-css">${css.replace(/</g, "&lt;").replace(/>/g, "&gt;")}</style>`;
42
- for (const file of findHTMLFiles(dir)) {
43
- let content = node_fs.default.readFileSync(file, "utf-8");
44
- if (content.includes("data-hedystia-css")) continue;
45
- if (content.includes("</head>")) content = content.replace("</head>", `${styleTag}</head>`);
46
- else content = `${styleTag}${content}`;
47
- node_fs.default.writeFileSync(file, content, "utf-8");
48
- }
49
- }
50
- function findHTMLFiles(dir) {
51
- const files = [];
52
- const walk = (d) => {
53
- for (const entry of node_fs.default.readdirSync(d, { withFileTypes: true })) {
54
- const full = node_path.default.join(d, entry.name);
55
- if (entry.isDirectory()) walk(full);
56
- else if (entry.name.endsWith(".html")) files.push(full);
57
- }
18
+ hooks: { "astro:config:setup": async ({ addRenderer, updateConfig }) => {
19
+ addRenderer(getRenderer());
20
+ updateConfig({ vite: {
21
+ plugins: [...plugins, configEnvironmentPlugin()],
22
+ ssr: { noExternal: ["@hedystia/view"] }
23
+ } });
24
+ } }
58
25
  };
59
- walk(dir);
60
- return files;
61
26
  }
62
27
  function configEnvironmentPlugin() {
63
28
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["fs","path"],"sources":["../src/index.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\nimport { viewPlugin } from \"@hedystia/view/vite\";\nimport type { AstroIntegration, AstroRenderer } from \"astro\";\nimport type { Plugin, UserConfig } from \"vite\";\n\nfunction getRenderer(): AstroRenderer {\n return {\n name: \"@hedystia/astro\",\n clientEntrypoint: \"@hedystia/astro/client.js\",\n serverEntrypoint: \"@hedystia/astro/server.js\",\n };\n}\n\nexport { getRenderer as getContainerRenderer };\n\nexport interface Options {\n include?: string[];\n exclude?: string[];\n}\n\nexport default function (options: Options = {}): AstroIntegration {\n const { plugins, collectedCSS } = viewPlugin(options);\n\n return {\n name: \"@hedystia/astro\",\n hooks: {\n \"astro:config:setup\": async ({ addRenderer, updateConfig }) => {\n addRenderer(getRenderer());\n updateConfig({\n vite: {\n plugins: [...plugins, configEnvironmentPlugin()],\n ssr: {\n noExternal: [\"@hedystia/view\"],\n },\n },\n });\n },\n \"astro:build:done\": async ({ dir }) => {\n if (collectedCSS.size > 0) {\n const css = Array.from(collectedCSS.values()).join(\"\\n\");\n injectCSSIntoHTML(dir.pathname, css);\n }\n },\n },\n };\n}\n\nfunction injectCSSIntoHTML(dir: string, css: string): void {\n const styleTag = `<style data-hedystia-css\">${css.replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\")}</style>`;\n\n for (const file of findHTMLFiles(dir)) {\n let content = fs.readFileSync(file, \"utf-8\");\n if (content.includes(\"data-hedystia-css\")) {\n continue;\n }\n if (content.includes(\"</head>\")) {\n content = content.replace(\"</head>\", `${styleTag}</head>`);\n } else {\n content = `${styleTag}${content}`;\n }\n fs.writeFileSync(file, content, \"utf-8\");\n }\n}\n\nfunction findHTMLFiles(dir: string): string[] {\n const files: string[] = [];\n const walk = (d: string) => {\n for (const entry of fs.readdirSync(d, { withFileTypes: true })) {\n const full = path.join(d, entry.name);\n if (entry.isDirectory()) {\n walk(full);\n } else if (entry.name.endsWith(\".html\")) {\n files.push(full);\n }\n }\n };\n walk(dir);\n return files;\n}\n\nfunction configEnvironmentPlugin(): Plugin {\n return {\n name: \"@hedystia/astro:config-environment\",\n configEnvironment(environmentName: string): UserConfig | Promise<UserConfig> | undefined {\n return {\n optimizeDeps: {\n include: environmentName === \"client\" ? [\"@hedystia/astro/client.js\"] : [],\n exclude: [\"@hedystia/astro/server.js\"],\n },\n };\n },\n };\n}\n"],"mappings":";;;;;;;;;;;AAMA,SAAS,cAA6B;CACpC,OAAO;EACL,MAAM;EACN,kBAAkB;EAClB,kBAAkB;CACpB;AACF;AASA,SAAA,YAAyB,UAAmB,CAAC,GAAqB;CAChE,MAAM,EAAE,SAAS,kBAAA,GAAA,oBAAA,YAA4B,OAAO;CAEpD,OAAO;EACL,MAAM;EACN,OAAO;GACL,sBAAsB,OAAO,EAAE,aAAa,mBAAmB;IAC7D,YAAY,YAAY,CAAC;IACzB,aAAa,EACX,MAAM;KACJ,SAAS,CAAC,GAAG,SAAS,wBAAwB,CAAC;KAC/C,KAAK,EACH,YAAY,CAAC,gBAAgB,EAC/B;IACF,EACF,CAAC;GACH;GACA,oBAAoB,OAAO,EAAE,UAAU;IACrC,IAAI,aAAa,OAAO,GAAG;KACzB,MAAM,MAAM,MAAM,KAAK,aAAa,OAAO,CAAC,EAAE,KAAK,IAAI;KACvD,kBAAkB,IAAI,UAAU,GAAG;IACrC;GACF;EACF;CACF;AACF;AAEA,SAAS,kBAAkB,KAAa,KAAmB;CACzD,MAAM,WAAW,6BAA6B,IAAI,QAAQ,MAAM,MAAM,EAAE,QAAQ,MAAM,MAAM,EAAE;CAE9F,KAAK,MAAM,QAAQ,cAAc,GAAG,GAAG;EACrC,IAAI,UAAUA,QAAAA,QAAG,aAAa,MAAM,OAAO;EAC3C,IAAI,QAAQ,SAAS,mBAAmB,GACtC;EAEF,IAAI,QAAQ,SAAS,SAAS,GAC5B,UAAU,QAAQ,QAAQ,WAAW,GAAG,SAAS,QAAQ;OAEzD,UAAU,GAAG,WAAW;EAE1B,QAAA,QAAG,cAAc,MAAM,SAAS,OAAO;CACzC;AACF;AAEA,SAAS,cAAc,KAAuB;CAC5C,MAAM,QAAkB,CAAC;CACzB,MAAM,QAAQ,MAAc;EAC1B,KAAK,MAAM,SAASA,QAAAA,QAAG,YAAY,GAAG,EAAE,eAAe,KAAK,CAAC,GAAG;GAC9D,MAAM,OAAOC,UAAAA,QAAK,KAAK,GAAG,MAAM,IAAI;GACpC,IAAI,MAAM,YAAY,GACpB,KAAK,IAAI;QACJ,IAAI,MAAM,KAAK,SAAS,OAAO,GACpC,MAAM,KAAK,IAAI;EAEnB;CACF;CACA,KAAK,GAAG;CACR,OAAO;AACT;AAEA,SAAS,0BAAkC;CACzC,OAAO;EACL,MAAM;EACN,kBAAkB,iBAAuE;GACvF,OAAO,EACL,cAAc;IACZ,SAAS,oBAAoB,WAAW,CAAC,2BAA2B,IAAI,CAAC;IACzE,SAAS,CAAC,2BAA2B;GACvC,EACF;EACF;CACF;AACF"}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { viewPlugin } from \"@hedystia/view/vite\";\nimport type { AstroIntegration, AstroRenderer } from \"astro\";\nimport type { Plugin, UserConfig } from \"vite\";\n\nfunction getRenderer(): AstroRenderer {\n return {\n name: \"@hedystia/astro\",\n clientEntrypoint: \"@hedystia/astro/client.js\",\n serverEntrypoint: \"@hedystia/astro/server.js\",\n };\n}\n\nexport { getRenderer as getContainerRenderer };\n\nexport interface Options {\n include?: string[];\n exclude?: string[];\n}\n\nexport default function (options: Options = {}): AstroIntegration {\n const { plugins } = viewPlugin(options);\n\n return {\n name: \"@hedystia/astro\",\n hooks: {\n \"astro:config:setup\": async ({ addRenderer, updateConfig }) => {\n addRenderer(getRenderer());\n updateConfig({\n vite: {\n plugins: [...plugins, configEnvironmentPlugin()],\n ssr: {\n noExternal: [\"@hedystia/view\"],\n },\n },\n });\n },\n },\n };\n}\n\nfunction configEnvironmentPlugin(): Plugin {\n return {\n name: \"@hedystia/astro:config-environment\",\n configEnvironment(environmentName: string): UserConfig | Promise<UserConfig> | undefined {\n return {\n optimizeDeps: {\n include: environmentName === \"client\" ? [\"@hedystia/astro/client.js\"] : [],\n exclude: [\"@hedystia/astro/server.js\"],\n },\n };\n },\n };\n}\n"],"mappings":";;;;;;AAIA,SAAS,cAA6B;CACpC,OAAO;EACL,MAAM;EACN,kBAAkB;EAClB,kBAAkB;CACpB;AACF;AASA,SAAA,YAAyB,UAAmB,CAAC,GAAqB;CAChE,MAAM,EAAE,aAAA,GAAA,oBAAA,YAAuB,OAAO;CAEtC,OAAO;EACL,MAAM;EACN,OAAO,EACL,sBAAsB,OAAO,EAAE,aAAa,mBAAmB;GAC7D,YAAY,YAAY,CAAC;GACzB,aAAa,EACX,MAAM;IACJ,SAAS,CAAC,GAAG,SAAS,wBAAwB,CAAC;IAC/C,KAAK,EACH,YAAY,CAAC,gBAAgB,EAC/B;GACF,EACF,CAAC;EACH,EACF;CACF;AACF;AAEA,SAAS,0BAAkC;CACzC,OAAO;EACL,MAAM;EACN,kBAAkB,iBAAuE;GACvF,OAAO,EACL,cAAc;IACZ,SAAS,oBAAoB,WAAW,CAAC,2BAA2B,IAAI,CAAC;IACzE,SAAS,CAAC,2BAA2B;GACvC,EACF;EACF;CACF;AACF"}
package/dist/index.mjs CHANGED
@@ -1,5 +1,3 @@
1
- import fs from "node:fs";
2
- import path from "node:path";
3
1
  import { viewPlugin } from "@hedystia/view/vite";
4
2
  //#region src/index.ts
5
3
  function getRenderer() {
@@ -10,47 +8,17 @@ function getRenderer() {
10
8
  };
11
9
  }
12
10
  function src_default(options = {}) {
13
- const { plugins, collectedCSS } = viewPlugin(options);
11
+ const { plugins } = viewPlugin(options);
14
12
  return {
15
13
  name: "@hedystia/astro",
16
- hooks: {
17
- "astro:config:setup": async ({ addRenderer, updateConfig }) => {
18
- addRenderer(getRenderer());
19
- updateConfig({ vite: {
20
- plugins: [...plugins, configEnvironmentPlugin()],
21
- ssr: { noExternal: ["@hedystia/view"] }
22
- } });
23
- },
24
- "astro:build:done": async ({ dir }) => {
25
- if (collectedCSS.size > 0) {
26
- const css = Array.from(collectedCSS.values()).join("\n");
27
- injectCSSIntoHTML(dir.pathname, css);
28
- }
29
- }
30
- }
31
- };
32
- }
33
- function injectCSSIntoHTML(dir, css) {
34
- const styleTag = `<style data-hedystia-css">${css.replace(/</g, "&lt;").replace(/>/g, "&gt;")}</style>`;
35
- for (const file of findHTMLFiles(dir)) {
36
- let content = fs.readFileSync(file, "utf-8");
37
- if (content.includes("data-hedystia-css")) continue;
38
- if (content.includes("</head>")) content = content.replace("</head>", `${styleTag}</head>`);
39
- else content = `${styleTag}${content}`;
40
- fs.writeFileSync(file, content, "utf-8");
41
- }
42
- }
43
- function findHTMLFiles(dir) {
44
- const files = [];
45
- const walk = (d) => {
46
- for (const entry of fs.readdirSync(d, { withFileTypes: true })) {
47
- const full = path.join(d, entry.name);
48
- if (entry.isDirectory()) walk(full);
49
- else if (entry.name.endsWith(".html")) files.push(full);
50
- }
14
+ hooks: { "astro:config:setup": async ({ addRenderer, updateConfig }) => {
15
+ addRenderer(getRenderer());
16
+ updateConfig({ vite: {
17
+ plugins: [...plugins, configEnvironmentPlugin()],
18
+ ssr: { noExternal: ["@hedystia/view"] }
19
+ } });
20
+ } }
51
21
  };
52
- walk(dir);
53
- return files;
54
22
  }
55
23
  function configEnvironmentPlugin() {
56
24
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\nimport { viewPlugin } from \"@hedystia/view/vite\";\nimport type { AstroIntegration, AstroRenderer } from \"astro\";\nimport type { Plugin, UserConfig } from \"vite\";\n\nfunction getRenderer(): AstroRenderer {\n return {\n name: \"@hedystia/astro\",\n clientEntrypoint: \"@hedystia/astro/client.js\",\n serverEntrypoint: \"@hedystia/astro/server.js\",\n };\n}\n\nexport { getRenderer as getContainerRenderer };\n\nexport interface Options {\n include?: string[];\n exclude?: string[];\n}\n\nexport default function (options: Options = {}): AstroIntegration {\n const { plugins, collectedCSS } = viewPlugin(options);\n\n return {\n name: \"@hedystia/astro\",\n hooks: {\n \"astro:config:setup\": async ({ addRenderer, updateConfig }) => {\n addRenderer(getRenderer());\n updateConfig({\n vite: {\n plugins: [...plugins, configEnvironmentPlugin()],\n ssr: {\n noExternal: [\"@hedystia/view\"],\n },\n },\n });\n },\n \"astro:build:done\": async ({ dir }) => {\n if (collectedCSS.size > 0) {\n const css = Array.from(collectedCSS.values()).join(\"\\n\");\n injectCSSIntoHTML(dir.pathname, css);\n }\n },\n },\n };\n}\n\nfunction injectCSSIntoHTML(dir: string, css: string): void {\n const styleTag = `<style data-hedystia-css\">${css.replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\")}</style>`;\n\n for (const file of findHTMLFiles(dir)) {\n let content = fs.readFileSync(file, \"utf-8\");\n if (content.includes(\"data-hedystia-css\")) {\n continue;\n }\n if (content.includes(\"</head>\")) {\n content = content.replace(\"</head>\", `${styleTag}</head>`);\n } else {\n content = `${styleTag}${content}`;\n }\n fs.writeFileSync(file, content, \"utf-8\");\n }\n}\n\nfunction findHTMLFiles(dir: string): string[] {\n const files: string[] = [];\n const walk = (d: string) => {\n for (const entry of fs.readdirSync(d, { withFileTypes: true })) {\n const full = path.join(d, entry.name);\n if (entry.isDirectory()) {\n walk(full);\n } else if (entry.name.endsWith(\".html\")) {\n files.push(full);\n }\n }\n };\n walk(dir);\n return files;\n}\n\nfunction configEnvironmentPlugin(): Plugin {\n return {\n name: \"@hedystia/astro:config-environment\",\n configEnvironment(environmentName: string): UserConfig | Promise<UserConfig> | undefined {\n return {\n optimizeDeps: {\n include: environmentName === \"client\" ? [\"@hedystia/astro/client.js\"] : [],\n exclude: [\"@hedystia/astro/server.js\"],\n },\n };\n },\n };\n}\n"],"mappings":";;;;AAMA,SAAS,cAA6B;CACpC,OAAO;EACL,MAAM;EACN,kBAAkB;EAClB,kBAAkB;CACpB;AACF;AASA,SAAA,YAAyB,UAAmB,CAAC,GAAqB;CAChE,MAAM,EAAE,SAAS,iBAAiB,WAAW,OAAO;CAEpD,OAAO;EACL,MAAM;EACN,OAAO;GACL,sBAAsB,OAAO,EAAE,aAAa,mBAAmB;IAC7D,YAAY,YAAY,CAAC;IACzB,aAAa,EACX,MAAM;KACJ,SAAS,CAAC,GAAG,SAAS,wBAAwB,CAAC;KAC/C,KAAK,EACH,YAAY,CAAC,gBAAgB,EAC/B;IACF,EACF,CAAC;GACH;GACA,oBAAoB,OAAO,EAAE,UAAU;IACrC,IAAI,aAAa,OAAO,GAAG;KACzB,MAAM,MAAM,MAAM,KAAK,aAAa,OAAO,CAAC,EAAE,KAAK,IAAI;KACvD,kBAAkB,IAAI,UAAU,GAAG;IACrC;GACF;EACF;CACF;AACF;AAEA,SAAS,kBAAkB,KAAa,KAAmB;CACzD,MAAM,WAAW,6BAA6B,IAAI,QAAQ,MAAM,MAAM,EAAE,QAAQ,MAAM,MAAM,EAAE;CAE9F,KAAK,MAAM,QAAQ,cAAc,GAAG,GAAG;EACrC,IAAI,UAAU,GAAG,aAAa,MAAM,OAAO;EAC3C,IAAI,QAAQ,SAAS,mBAAmB,GACtC;EAEF,IAAI,QAAQ,SAAS,SAAS,GAC5B,UAAU,QAAQ,QAAQ,WAAW,GAAG,SAAS,QAAQ;OAEzD,UAAU,GAAG,WAAW;EAE1B,GAAG,cAAc,MAAM,SAAS,OAAO;CACzC;AACF;AAEA,SAAS,cAAc,KAAuB;CAC5C,MAAM,QAAkB,CAAC;CACzB,MAAM,QAAQ,MAAc;EAC1B,KAAK,MAAM,SAAS,GAAG,YAAY,GAAG,EAAE,eAAe,KAAK,CAAC,GAAG;GAC9D,MAAM,OAAO,KAAK,KAAK,GAAG,MAAM,IAAI;GACpC,IAAI,MAAM,YAAY,GACpB,KAAK,IAAI;QACJ,IAAI,MAAM,KAAK,SAAS,OAAO,GACpC,MAAM,KAAK,IAAI;EAEnB;CACF;CACA,KAAK,GAAG;CACR,OAAO;AACT;AAEA,SAAS,0BAAkC;CACzC,OAAO;EACL,MAAM;EACN,kBAAkB,iBAAuE;GACvF,OAAO,EACL,cAAc;IACZ,SAAS,oBAAoB,WAAW,CAAC,2BAA2B,IAAI,CAAC;IACzE,SAAS,CAAC,2BAA2B;GACvC,EACF;EACF;CACF;AACF"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { viewPlugin } from \"@hedystia/view/vite\";\nimport type { AstroIntegration, AstroRenderer } from \"astro\";\nimport type { Plugin, UserConfig } from \"vite\";\n\nfunction getRenderer(): AstroRenderer {\n return {\n name: \"@hedystia/astro\",\n clientEntrypoint: \"@hedystia/astro/client.js\",\n serverEntrypoint: \"@hedystia/astro/server.js\",\n };\n}\n\nexport { getRenderer as getContainerRenderer };\n\nexport interface Options {\n include?: string[];\n exclude?: string[];\n}\n\nexport default function (options: Options = {}): AstroIntegration {\n const { plugins } = viewPlugin(options);\n\n return {\n name: \"@hedystia/astro\",\n hooks: {\n \"astro:config:setup\": async ({ addRenderer, updateConfig }) => {\n addRenderer(getRenderer());\n updateConfig({\n vite: {\n plugins: [...plugins, configEnvironmentPlugin()],\n ssr: {\n noExternal: [\"@hedystia/view\"],\n },\n },\n });\n },\n },\n };\n}\n\nfunction configEnvironmentPlugin(): Plugin {\n return {\n name: \"@hedystia/astro:config-environment\",\n configEnvironment(environmentName: string): UserConfig | Promise<UserConfig> | undefined {\n return {\n optimizeDeps: {\n include: environmentName === \"client\" ? [\"@hedystia/astro/client.js\"] : [],\n exclude: [\"@hedystia/astro/server.js\"],\n },\n };\n },\n };\n}\n"],"mappings":";;AAIA,SAAS,cAA6B;CACpC,OAAO;EACL,MAAM;EACN,kBAAkB;EAClB,kBAAkB;CACpB;AACF;AASA,SAAA,YAAyB,UAAmB,CAAC,GAAqB;CAChE,MAAM,EAAE,YAAY,WAAW,OAAO;CAEtC,OAAO;EACL,MAAM;EACN,OAAO,EACL,sBAAsB,OAAO,EAAE,aAAa,mBAAmB;GAC7D,YAAY,YAAY,CAAC;GACzB,aAAa,EACX,MAAM;IACJ,SAAS,CAAC,GAAG,SAAS,wBAAwB,CAAC;IAC/C,KAAK,EACH,YAAY,CAAC,gBAAgB,EAC/B;GACF,EACF,CAAC;EACH,EACF;CACF;AACF;AAEA,SAAS,0BAAkC;CACzC,OAAO;EACL,MAAM;EACN,kBAAkB,iBAAuE;GACvF,OAAO,EACL,cAAc;IACZ,SAAS,oBAAoB,WAAW,CAAC,2BAA2B,IAAI,CAAC;IACzE,SAAS,CAAC,2BAA2B;GACvC,EACF;EACF;CACF;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hedystia/astro",
3
- "version": "2.3.18",
3
+ "version": "2.3.20",
4
4
  "description": "Use @hedystia/view components within Astro",
5
5
  "homepage": "https://docs.hedystia.com",
6
6
  "private": false,
@@ -1,23 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
- key = keys[i];
11
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
- get: ((k) => from[k]).bind(null, key),
13
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
- });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
- value: mod,
20
- enumerable: true
21
- }) : target, mod));
22
- //#endregion
23
- exports.__toESM = __toESM;