@wovin/connect-web3storage 0.0.1-RC13 → 0.0.1-RC15

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.
@@ -1,9 +1,4 @@
1
- import {
2
- init_dirname
3
- } from "./chunk-7D7G4D2O.js";
4
-
5
1
  // src/utils.ts
6
- init_dirname();
7
2
  var parseW3Name = () => {
8
3
  throw new Error(`pls no parseW3Name`);
9
4
  };
@@ -11,4 +6,4 @@ var parseW3Name = () => {
11
6
  export {
12
7
  parseW3Name
13
8
  };
14
- //# sourceMappingURL=chunk-YC56CFSP.js.map
9
+ //# sourceMappingURL=chunk-AD3R2OSM.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils.ts"],"sourcesContent":["// import * as W3Name from 'w3name'\n\nexport const parseW3Name = () => {\n\tthrow new Error(`pls no parseW3Name`)\n} // HACK: W3Name.parse\n"],"mappings":";;;;;AAAA;AAEO,IAAM,cAAc,MAAM;AAChC,QAAM,IAAI,MAAM,oBAAoB;AACrC;","names":[]}
1
+ {"version":3,"sources":["../src/utils.ts"],"sourcesContent":["// import * as W3Name from 'w3name'\n\nexport const parseW3Name = () => {\n\tthrow new Error(`pls no parseW3Name`)\n} // HACK: W3Name.parse\n"],"mappings":";AAEO,IAAM,cAAc,MAAM;AAChC,QAAM,IAAI,MAAM,oBAAoB;AACrC;","names":[]}
@@ -0,0 +1,69 @@
1
+ // src/retrieve.ts
2
+ import { CarReader } from "@ipld/car";
3
+ import { sortApplogsByTs } from "@wovin/core/applog";
4
+ import { decodeCarToApplogs } from "@wovin/core/ipfs";
5
+ import { Logger } from "besonders-logger";
6
+ import { CID } from "multiformats/cid";
7
+ import { ApplogStreamInMemory } from "@wovin/core/stream";
8
+ var { WARN, LOG, DEBUG, VERBOSE, ERROR } = Logger.setup(Logger.DEBUG);
9
+ async function retrievePubStream(pubID, pinnedCID) {
10
+ let cid;
11
+ if (pinnedCID) {
12
+ cid = CID.parse(pinnedCID);
13
+ } else {
14
+ try {
15
+ cid = await resolveIPNS(
16
+ /* parseW3Name( */
17
+ pubID
18
+ /* ) */
19
+ );
20
+ DEBUG(`Resolved pub to CID`, cid.toString());
21
+ } catch (err) {
22
+ throw ERROR(`Failed to resolve IPNS ${pubID}:`, err);
23
+ }
24
+ }
25
+ const car = await retrieveCar(cid.toString());
26
+ const { applogs: maybeEncrypted } = await decodeCarToApplogs(car);
27
+ const encrypted = maybeEncrypted.filter((log) => log instanceof Uint8Array);
28
+ if (encrypted.length)
29
+ WARN(`Found ${encrypted.length} encrypted logs - skipping`);
30
+ const applogs = maybeEncrypted.filter((log) => !(log instanceof Uint8Array));
31
+ sortApplogsByTs(applogs);
32
+ const dataStream = new ApplogStreamInMemory(applogs, [], `preview-${pubID}`, true);
33
+ return { cid, dataStream };
34
+ }
35
+ async function resolveIPNS(name) {
36
+ const response = await fetch(`https://name.web3.storage/name/${name}`);
37
+ const result = await response.json();
38
+ if (!result.value.startsWith("/ipfs/")) {
39
+ console.warn("IPNS value is not ipfs:", result);
40
+ }
41
+ return CID.parse(result.value.replace("/ipfs/", ""));
42
+ }
43
+ async function retrieveCar(cid) {
44
+ DEBUG("Retrieving:", cid);
45
+ const response = await fetch(`https://cloudflare-ipfs.com/ipfs/${cid}?format=car&dag-scope=all`);
46
+ if (!response?.ok || !response?.body) {
47
+ throw new Error(`unexpected response ${response?.statusText}`);
48
+ }
49
+ const data = streamToIterable(response.body.getReader());
50
+ return await CarReader.fromIterable(data);
51
+ }
52
+ function streamToIterable(bodyReader) {
53
+ return async function* () {
54
+ while (true) {
55
+ const { done, value } = await bodyReader.read();
56
+ if (done) {
57
+ break;
58
+ }
59
+ yield value;
60
+ }
61
+ }();
62
+ }
63
+
64
+ export {
65
+ retrievePubStream,
66
+ resolveIPNS,
67
+ retrieveCar
68
+ };
69
+ //# sourceMappingURL=chunk-HGF4ODHV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/retrieve.ts"],"sourcesContent":["import { CarReader } from '@ipld/car'\n// import { create } from '@web3-storage/w3up-client'\nimport { Applog, CidString, sortApplogsByTs } from '@wovin/core/applog'\nimport { decodeCarToApplogs } from '@wovin/core/ipfs'\nimport { Logger } from 'besonders-logger'\nimport { CID } from 'multiformats/cid'\n// import * as W3Name from 'w3name'\nimport { ApplogStreamInMemory } from '@wovin/core/stream'\n\nconst { WARN, LOG, DEBUG, VERBOSE, ERROR } = Logger.setup(Logger.DEBUG) // eslint-disable-line no-unused-vars\n\n// let w3sReadonly: Web3Storage = new Web3Storage({ token: 'FAKE' })\n// const client = await create()\n\n// const GATEWAYS = [\n// \t'https://cloudflare-ipfs.com/ipfs/CID/?format=car&dag-scope=all',\n// \t// \"https://cloudflare-ipfs.com/ipfs/CID/?format=car&dag-scope=block\",\n// \t// \"https://cloudflare-ipfs.com/ipfs/CID/?format=car&dag-scope=entity\",\n// \t'https://CID.ipfs.dweb.link/?format=car&dag-scope=all',\n// \t'https://CID.ipfs.dweb.link/?format=car&dag-scope=block',\n// \t'https://CID.ipfs.dweb.link/?format=car&dag-scope=entity',\n// \t'https://dweb.link/ipfs/CID/?format=car&dag-scope=all',\n// \t'https://dweb.link/ipfs/CID/?format=car&dag-scope=block',\n// \t'https://dweb.link/ipfs/CID/?format=car&dag-scope=entity',\n// \t'https://ipfs.4everland.io/ipfs/CID/?format=car&dag-scope=all',\n// \t'https://ipfs.4everland.io/ipfs/CID/?format=car&dag-scope=block',\n// \t'https://ipfs.4everland.io/ipfs/CID/?format=car&dag-scope=entity',\n// \t'https://ipfs.io/ipfs/CID/?format=car&dag-scope=all',\n// \t'https://ipfs.io/ipfs/CID/?format=car&dag-scope=block',\n// \t'https://ipfs.io/ipfs/CID/?format=car&dag-scope=entity',\n// ]\n\nexport async function retrievePubStream(pubID: CidString, pinnedCID?: CidString) {\n\tlet cid: CID\n\tif (pinnedCID) {\n\t\tcid = CID.parse(pinnedCID)\n\t} else {\n\t\ttry {\n\t\t\tcid = await resolveIPNS(/* parseW3Name( */ pubID /* ) */)\n\t\t\tDEBUG(`Resolved pub to CID`, cid.toString())\n\t\t} catch (err) {\n\t\t\tthrow ERROR(`Failed to resolve IPNS ${pubID}:`, err)\n\t\t}\n\t}\n\tconst car = await retrieveCar(cid.toString())\n\tconst { applogs: maybeEncrypted } = await decodeCarToApplogs(car)\n\tconst encrypted = maybeEncrypted.filter(log => log instanceof Uint8Array) as Uint8Array[]\n\tif (encrypted.length) WARN(`Found ${encrypted.length} encrypted logs - skipping`) // TODO: decryption\n\tconst applogs = maybeEncrypted.filter(log => !(log instanceof Uint8Array)) as Applog[]\n\tsortApplogsByTs(applogs)\n\tconst dataStream = new ApplogStreamInMemory(applogs, [], `preview-${pubID}`, true)\n\treturn { cid, dataStream }\n\t// return dataStream\n}\n\nexport async function resolveIPNS(name: CidString /* W3Name.Name */): Promise<CID> {\n\tconst response = await fetch(`https://name.web3.storage/name/${name}`)\n\tconst result = await response.json()\n\t// return result\n\t// const revision = await W3Name.resolve(name)\n\t// DEBUG('[w3name] resolved', name.toString(), 'to', revision)\n\tif (!result.value.startsWith('/ipfs/')) {\n\t\tconsole.warn('IPNS value is not ipfs:', result)\n\t}\n\treturn CID.parse(result.value.replace('/ipfs/', ''))\n}\n\nexport async function retrieveCar(cid: CidString): Promise<CarReader> {\n\t// Fetch the CAR file from web3.storage\n\tDEBUG('Retrieving:', cid)\n\t// const response = await w3sReadonly.get(cid)\n\t// const response = await fetch(`https://saturn.ms/ipfs/${cid}?format=car&dag-scope=all`)\n\tconst response = await fetch(`https://cloudflare-ipfs.com/ipfs/${cid}?format=car&dag-scope=all`) // HACK: w3s is broken\n\tif (!response?.ok || !response?.body) {\n\t\tthrow new Error(`unexpected response ${response?.statusText}`)\n\t}\n\n\t// The data is an AsyncIterable<Uint8Array>, convert it to an AsyncIterable for the CarReader\n\tconst data: AsyncIterable<Uint8Array> = streamToIterable(response!.body.getReader())\n\n\t// return a CarReader from the CAR data\n\treturn await CarReader.fromIterable(data)\n}\n\nfunction streamToIterable(bodyReader: any): AsyncIterable<Uint8Array> {\n\treturn (async function*() {\n\t\twhile (true) {\n\t\t\tconst { done, value } = await bodyReader.read()\n\t\t\tif (done) {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tyield value\n\t\t}\n\t})()\n}\n"],"mappings":";AAAA,SAAS,iBAAiB;AAE1B,SAA4B,uBAAuB;AACnD,SAAS,0BAA0B;AACnC,SAAS,cAAc;AACvB,SAAS,WAAW;AAEpB,SAAS,4BAA4B;AAErC,IAAM,EAAE,MAAM,KAAK,OAAO,SAAS,MAAM,IAAI,OAAO,MAAM,OAAO,KAAK;AAuBtE,eAAsB,kBAAkB,OAAkB,WAAuB;AAChF,MAAI;AACJ,MAAI,WAAW;AACd,UAAM,IAAI,MAAM,SAAS;AAAA,EAC1B,OAAO;AACN,QAAI;AACH,YAAM,MAAM;AAAA;AAAA,QAA+B;AAAA;AAAA,MAAa;AACxD,YAAM,uBAAuB,IAAI,SAAS,CAAC;AAAA,IAC5C,SAAS,KAAK;AACb,YAAM,MAAM,0BAA0B,KAAK,KAAK,GAAG;AAAA,IACpD;AAAA,EACD;AACA,QAAM,MAAM,MAAM,YAAY,IAAI,SAAS,CAAC;AAC5C,QAAM,EAAE,SAAS,eAAe,IAAI,MAAM,mBAAmB,GAAG;AAChE,QAAM,YAAY,eAAe,OAAO,SAAO,eAAe,UAAU;AACxE,MAAI,UAAU;AAAQ,SAAK,SAAS,UAAU,MAAM,4BAA4B;AAChF,QAAM,UAAU,eAAe,OAAO,SAAO,EAAE,eAAe,WAAW;AACzE,kBAAgB,OAAO;AACvB,QAAM,aAAa,IAAI,qBAAqB,SAAS,CAAC,GAAG,WAAW,KAAK,IAAI,IAAI;AACjF,SAAO,EAAE,KAAK,WAAW;AAE1B;AAEA,eAAsB,YAAY,MAAiD;AAClF,QAAM,WAAW,MAAM,MAAM,kCAAkC,IAAI,EAAE;AACrE,QAAM,SAAS,MAAM,SAAS,KAAK;AAInC,MAAI,CAAC,OAAO,MAAM,WAAW,QAAQ,GAAG;AACvC,YAAQ,KAAK,2BAA2B,MAAM;AAAA,EAC/C;AACA,SAAO,IAAI,MAAM,OAAO,MAAM,QAAQ,UAAU,EAAE,CAAC;AACpD;AAEA,eAAsB,YAAY,KAAoC;AAErE,QAAM,eAAe,GAAG;AAGxB,QAAM,WAAW,MAAM,MAAM,oCAAoC,GAAG,2BAA2B;AAC/F,MAAI,CAAC,UAAU,MAAM,CAAC,UAAU,MAAM;AACrC,UAAM,IAAI,MAAM,uBAAuB,UAAU,UAAU,EAAE;AAAA,EAC9D;AAGA,QAAM,OAAkC,iBAAiB,SAAU,KAAK,UAAU,CAAC;AAGnF,SAAO,MAAM,UAAU,aAAa,IAAI;AACzC;AAEA,SAAS,iBAAiB,YAA4C;AACrE,SAAQ,mBAAkB;AACzB,WAAO,MAAM;AACZ,YAAM,EAAE,MAAM,MAAM,IAAI,MAAM,WAAW,KAAK;AAC9C,UAAI,MAAM;AACT;AAAA,MACD;AACA,YAAM;AAAA,IACP;AAAA,EACD,EAAG;AACJ;","names":[]}
package/dist/index.js CHANGED
@@ -2,16 +2,12 @@ import {
2
2
  resolveIPNS,
3
3
  retrieveCar,
4
4
  retrievePubStream
5
- } from "./chunk-SIRHAPOU.js";
5
+ } from "./chunk-HGF4ODHV.js";
6
6
  import {
7
7
  parseW3Name
8
- } from "./chunk-YC56CFSP.js";
9
- import {
10
- init_dirname
11
- } from "./chunk-7D7G4D2O.js";
8
+ } from "./chunk-AD3R2OSM.js";
12
9
 
13
10
  // src/index.ts
14
- init_dirname();
15
11
  var w3sTest = 10.3;
16
12
  export {
17
13
  parseW3Name,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export const w3sTest = 10.3\n\nexport * from './retrieve'\n// export * from './store'\nexport * from './utils'\n"],"mappings":";;;;;;;;;;;;;AAAA;AAAO,IAAM,UAAU;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export const w3sTest = 10.3\n\nexport * from './retrieve'\n// export * from './store'\nexport * from './utils'\n"],"mappings":";;;;;;;;;;AAAO,IAAM,UAAU;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"retrieve.d.ts","sourceRoot":"","sources":["../src/retrieve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,OAAO,EAAU,SAAS,EAAmB,MAAM,oBAAoB,CAAA;AAGvE,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAEtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAOzD,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,SAAS;;;GAqB9E;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,SAAS,GAAqB,OAAO,CAAC,GAAG,CAAC,CAUjF;AAED,wBAAsB,WAAW,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAepE"}
1
+ {"version":3,"file":"retrieve.d.ts","sourceRoot":"","sources":["../src/retrieve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,OAAO,EAAU,SAAS,EAAmB,MAAM,oBAAoB,CAAA;AAGvE,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAEtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAyBzD,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,SAAS;;;GAqB9E;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,SAAS,GAAqB,OAAO,CAAC,GAAG,CAAC,CAUjF;AAED,wBAAsB,WAAW,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,CAepE"}
package/dist/retrieve.js CHANGED
@@ -2,8 +2,7 @@ import {
2
2
  resolveIPNS,
3
3
  retrieveCar,
4
4
  retrievePubStream
5
- } from "./chunk-SIRHAPOU.js";
6
- import "./chunk-7D7G4D2O.js";
5
+ } from "./chunk-HGF4ODHV.js";
7
6
  export {
8
7
  resolveIPNS,
9
8
  retrieveCar,
package/dist/store.js CHANGED
@@ -1,7 +1 @@
1
- import {
2
- init_dirname
3
- } from "./chunk-7D7G4D2O.js";
4
-
5
- // src/store.ts
6
- init_dirname();
7
1
  //# sourceMappingURL=store.js.map
package/dist/store.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/store.ts"],"sourcesContent":[""],"mappings":";;;;;AAAA;","names":[]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/utils.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  parseW3Name
3
- } from "./chunk-YC56CFSP.js";
4
- import "./chunk-7D7G4D2O.js";
3
+ } from "./chunk-AD3R2OSM.js";
5
4
  export {
6
5
  parseW3Name
7
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wovin/connect-web3storage",
3
- "version": "0.0.1-RC13",
3
+ "version": "0.0.1-RC15",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "tsup && tsc --emitDeclarationOnly --declaration",
@@ -22,14 +22,15 @@
22
22
  "dist/"
23
23
  ],
24
24
  "dependencies": {
25
- "@wovin/core": "0.0.1-RC13"
25
+ "@wovin/core": "0.0.1-RC15",
26
+ "@ipld/car": "^5.2.4",
27
+ "besonders-logger": "1.0.0-RC11",
28
+ "multiformats": "^12.1.3"
26
29
  },
27
30
  "devDependencies": {
28
- "@ipld/car": "^5.2.4",
29
- "@web3-storage/w3up-client": "^11.2.1",
30
- "besonders-logger": "1.0.0-RC9",
31
31
  "esbuild-plugin-polyfill-node": "^0.3.0",
32
32
  "tsup": "^8.0.1",
33
+ "tsupconfig": "workspace:^",
33
34
  "typescript": "^5.0.2"
34
35
  }
35
36
  }
@@ -1,14 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkIPDFNP52cjs = require('./chunk-IPDFNP52.cjs');
4
-
5
- // src/utils.ts
6
- _chunkIPDFNP52cjs.init_dirname.call(void 0, );
7
- var parseW3Name = () => {
8
- throw new Error(`pls no parseW3Name`);
9
- };
10
-
11
-
12
-
13
- exports.parseW3Name = parseW3Name;
14
- //# sourceMappingURL=chunk-56RPA6MM.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/utils.ts"],"names":[],"mappings":";;;;;AAAA;AAEO,IAAM,cAAc,MAAM;AAChC,QAAM,IAAI,MAAM,oBAAoB;AACrC","sourcesContent":["// import * as W3Name from 'w3name'\n\nexport const parseW3Name = () => {\n\tthrow new Error(`pls no parseW3Name`)\n} // HACK: W3Name.parse\n"]}
@@ -1,51 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __esm = (fn, res) => function __init() {
9
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
- };
11
- var __commonJS = (cb, mod) => function __require() {
12
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13
- };
14
- var __copyProps = (to, from, except, desc) => {
15
- if (from && typeof from === "object" || typeof from === "function") {
16
- for (let key of __getOwnPropNames(from))
17
- if (!__hasOwnProp.call(to, key) && key !== except)
18
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
- }
20
- return to;
21
- };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
- mod
29
- ));
30
- var __publicField = (obj, key, value) => {
31
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
32
- return value;
33
- };
34
-
35
- // ../../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.8/node_modules/esbuild-plugin-polyfill-node/polyfills/__dirname.js
36
- var __dirname;
37
- var init_dirname = __esm({
38
- "../../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.8/node_modules/esbuild-plugin-polyfill-node/polyfills/__dirname.js"() {
39
- "use strict";
40
- __dirname = "/";
41
- }
42
- });
43
-
44
- export {
45
- __commonJS,
46
- __toESM,
47
- __publicField,
48
- __dirname,
49
- init_dirname
50
- };
51
- //# sourceMappingURL=chunk-7D7G4D2O.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.8/node_modules/esbuild-plugin-polyfill-node/polyfills/__dirname.js"],"sourcesContent":["export const __dirname = \"/\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAa;AAAb;AAAA;AAAA;AAAO,IAAM,YAAY;AAAA;AAAA;","names":[]}
@@ -1,51 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __esm = (fn, res) => function __init() {
9
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
- };
11
- var __commonJS = (cb, mod) => function __require() {
12
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13
- };
14
- var __copyProps = (to, from, except, desc) => {
15
- if (from && typeof from === "object" || typeof from === "function") {
16
- for (let key of __getOwnPropNames(from))
17
- if (!__hasOwnProp.call(to, key) && key !== except)
18
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
- }
20
- return to;
21
- };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
- mod
29
- ));
30
- var __publicField = (obj, key, value) => {
31
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
32
- return value;
33
- };
34
-
35
- // ../../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.8/node_modules/esbuild-plugin-polyfill-node/polyfills/__dirname.js
36
- var __dirname;
37
- var init_dirname = __esm({
38
- "../../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.8/node_modules/esbuild-plugin-polyfill-node/polyfills/__dirname.js"() {
39
- "use strict";
40
- __dirname = exports.__dirname = "/";
41
- }
42
- });
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
- exports.__commonJS = __commonJS; exports.__toESM = __toESM; exports.__publicField = __publicField; exports.__dirname = __dirname; exports.init_dirname = init_dirname;
51
- //# sourceMappingURL=chunk-IPDFNP52.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../node_modules/.pnpm/esbuild-plugin-polyfill-node@0.3.0_esbuild@0.19.8/node_modules/esbuild-plugin-polyfill-node/polyfills/__dirname.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAa;AAAb;AAAA;AAAA;AAAO,IAAM,YAAY;AAAA;AAAA","sourcesContent":["export const __dirname = \"/\";\n"]}