houdini-svelte 1.2.3 → 1.2.4

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,6 +1,5 @@
1
- import type { GenerateHookInput, Config } from 'houdini';
1
+ import type { GenerateHookInput } from 'houdini';
2
2
  export default function (input: PluginGenerateInput): Promise<void>;
3
- export type PluginGenerateInput = Omit<GenerateHookInput, 'config'> & {
4
- config: Config;
3
+ export type PluginGenerateInput = GenerateHookInput & {
5
4
  framework: 'kit' | 'svelte';
6
5
  };
@@ -1,5 +1,6 @@
1
1
  import type { Framework } from './kit';
2
2
  declare const _default: (getFramwork: () => Framework) => {
3
+ config?: ((config: import("houdini").Config) => import("vite").UserConfig) | undefined;
3
4
  resolveId?: import("rollup").ObjectHook<(this: import("rollup").PluginContext, source: string, importer: string | undefined, options: {
4
5
  config: import("houdini").Config;
5
6
  custom?: import("rollup").CustomPluginOptions | undefined;
@@ -10,5 +11,8 @@ declare const _default: (getFramwork: () => Framework) => {
10
11
  config: import("houdini").Config;
11
12
  ssr?: boolean | undefined;
12
13
  }) => import("rollup").LoadResult | Promise<import("rollup").LoadResult>, {}> | undefined;
14
+ configureServer?: import("rollup").ObjectHook<(this: void, server: import("vite").ViteDevServer & {
15
+ houdiniConfig: import("houdini").Config;
16
+ }) => void | (() => void) | Promise<void | (() => void)>, {}> | undefined;
13
17
  } | undefined;
14
18
  export default _default;
@@ -89558,6 +89558,7 @@ __export2(fs_exports, {
89558
89558
  recursiveCopy: () => recursiveCopy,
89559
89559
  remove: () => remove,
89560
89560
  rmdir: () => rmdir,
89561
+ snapshot: () => snapshot,
89561
89562
  stat: () => stat,
89562
89563
  writeFile: () => writeFile
89563
89564
  });
@@ -89744,16 +89745,17 @@ function existsSync(dirPath) {
89744
89745
  }
89745
89746
  return import_memfs.fs.existsSync(dirPath);
89746
89747
  }
89747
- async function readdir(filepath) {
89748
+ async function readdir(filepath, opts) {
89748
89749
  if (!houdini_mode.is_testing) {
89749
- return await import_promises.default.readdir(filepath);
89750
+ return await import_promises.default.readdir(filepath, opts);
89750
89751
  }
89751
89752
  if (filepath.includes("build/runtime")) {
89752
- return await import_promises.default.readdir(filepath);
89753
+ return await import_promises.default.readdir(filepath, opts);
89753
89754
  }
89754
89755
  try {
89755
- return import_memfs.fs.readdirSync(filepath);
89756
- } catch {
89756
+ return import_memfs.fs.readdirSync(filepath, opts);
89757
+ } catch (e22) {
89758
+ console.log(e22);
89757
89759
  return [];
89758
89760
  }
89759
89761
  }
@@ -89804,6 +89806,11 @@ async function recursiveCopy(source, target, transforms, notRoot) {
89804
89806
  );
89805
89807
  }
89806
89808
  }
89809
+ function snapshot(base) {
89810
+ return Object.fromEntries(
89811
+ Object.entries(import_memfs.vol.toJSON()).filter(([key]) => !base || key.startsWith(base)).map(([key, value2]) => [!base ? key : key.substring(base.length), value2])
89812
+ );
89813
+ }
89807
89814
  async function glob(pattern) {
89808
89815
  return await (0, import_node_util.promisify)(import_glob.glob)(posixify(pattern));
89809
89816
  }
@@ -90671,6 +90678,10 @@ var List = class {
90671
90678
  updates: ["append", "prepend"],
90672
90679
  selection: {
90673
90680
  fields: {
90681
+ __typename: {
90682
+ keyRaw: "__typename",
90683
+ type: "String"
90684
+ },
90674
90685
  node: {
90675
90686
  type: listType,
90676
90687
  keyRaw: "node",
@@ -90695,7 +90706,15 @@ var List = class {
90695
90706
  };
90696
90707
  insertData = {
90697
90708
  newEntry: {
90698
- edges: [{ node: { ...data2, __typename: listType } }]
90709
+ edges: [
90710
+ {
90711
+ __typename: listType + "Edge",
90712
+ node: {
90713
+ ...data2,
90714
+ __typename: listType
90715
+ }
90716
+ }
90717
+ ]
90699
90718
  }
90700
90719
  };
90701
90720
  } else {
@@ -91119,6 +91138,23 @@ var InMemoryStorage = class {
91119
91138
  }
91120
91139
  return this.data[this.data.length - 1];
91121
91140
  }
91141
+ serialize() {
91142
+ return JSON.stringify({
91143
+ rank: this.rank,
91144
+ fields: this.topLayer.fields,
91145
+ links: this.topLayer.links
91146
+ });
91147
+ }
91148
+ hydrate(args, layer) {
91149
+ if (!args) {
91150
+ return;
91151
+ }
91152
+ const { rank, fields, links } = args;
91153
+ this.rank = rank;
91154
+ layer ??= this.createLayer(true);
91155
+ layer.fields = fields;
91156
+ layer.links = links;
91157
+ }
91122
91158
  };
91123
91159
  var Layer = class {
91124
91160
  id;
@@ -91696,6 +91732,12 @@ var Cache = class {
91696
91732
  config() {
91697
91733
  return this._internal_unstable.config;
91698
91734
  }
91735
+ serialize() {
91736
+ return this._internal_unstable.storage.serialize();
91737
+ }
91738
+ hydrate(...args) {
91739
+ return this._internal_unstable.storage.hydrate(...args);
91740
+ }
91699
91741
  clearLayer(layerID) {
91700
91742
  const layer = this._internal_unstable.storage.getLayer(layerID);
91701
91743
  if (!layer) {
@@ -92726,7 +92768,7 @@ function deepMerge2(filepath, ...targets) {
92726
92768
  });
92727
92769
  }
92728
92770
  }
92729
- async function parseJS(str, config4) {
92771
+ function parseJS(str, config4) {
92730
92772
  const defaultConfig = {
92731
92773
  plugins: ["typescript", "importAssertions"],
92732
92774
  sourceType: "module"
@@ -154988,6 +155030,7 @@ __export3(fs_exports2, {
154988
155030
  recursiveCopy: () => recursiveCopy2,
154989
155031
  remove: () => remove2,
154990
155032
  rmdir: () => rmdir2,
155033
+ snapshot: () => snapshot2,
154991
155034
  stat: () => stat3,
154992
155035
  writeFile: () => writeFile2
154993
155036
  });
@@ -155174,16 +155217,17 @@ function existsSync2(dirPath) {
155174
155217
  }
155175
155218
  return import_memfs2.fs.existsSync(dirPath);
155176
155219
  }
155177
- async function readdir2(filepath) {
155220
+ async function readdir2(filepath, opts) {
155178
155221
  if (!houdini_mode2.is_testing) {
155179
- return await import_promises2.default.readdir(filepath);
155222
+ return await import_promises2.default.readdir(filepath, opts);
155180
155223
  }
155181
155224
  if (filepath.includes("build/runtime")) {
155182
- return await import_promises2.default.readdir(filepath);
155225
+ return await import_promises2.default.readdir(filepath, opts);
155183
155226
  }
155184
155227
  try {
155185
- return import_memfs2.fs.readdirSync(filepath);
155186
- } catch {
155228
+ return import_memfs2.fs.readdirSync(filepath, opts);
155229
+ } catch (e22) {
155230
+ console.log(e22);
155187
155231
  return [];
155188
155232
  }
155189
155233
  }
@@ -155234,6 +155278,11 @@ async function recursiveCopy2(source, target, transforms, notRoot) {
155234
155278
  );
155235
155279
  }
155236
155280
  }
155281
+ function snapshot2(base) {
155282
+ return Object.fromEntries(
155283
+ Object.entries(import_memfs2.vol.toJSON()).filter(([key]) => !base || key.startsWith(base)).map(([key, value2]) => [!base ? key : key.substring(base.length), value2])
155284
+ );
155285
+ }
155237
155286
  async function glob2(pattern) {
155238
155287
  return await (0, import_node_util5.promisify)(import_glob2.glob)(posixify2(pattern));
155239
155288
  }
@@ -156087,6 +156136,10 @@ var List2 = class {
156087
156136
  updates: ["append", "prepend"],
156088
156137
  selection: {
156089
156138
  fields: {
156139
+ __typename: {
156140
+ keyRaw: "__typename",
156141
+ type: "String"
156142
+ },
156090
156143
  node: {
156091
156144
  type: listType,
156092
156145
  keyRaw: "node",
@@ -156111,7 +156164,15 @@ var List2 = class {
156111
156164
  };
156112
156165
  insertData = {
156113
156166
  newEntry: {
156114
- edges: [{ node: { ...data2, __typename: listType } }]
156167
+ edges: [
156168
+ {
156169
+ __typename: listType + "Edge",
156170
+ node: {
156171
+ ...data2,
156172
+ __typename: listType
156173
+ }
156174
+ }
156175
+ ]
156115
156176
  }
156116
156177
  };
156117
156178
  } else {
@@ -156535,6 +156596,23 @@ var InMemoryStorage2 = class {
156535
156596
  }
156536
156597
  return this.data[this.data.length - 1];
156537
156598
  }
156599
+ serialize() {
156600
+ return JSON.stringify({
156601
+ rank: this.rank,
156602
+ fields: this.topLayer.fields,
156603
+ links: this.topLayer.links
156604
+ });
156605
+ }
156606
+ hydrate(args, layer) {
156607
+ if (!args) {
156608
+ return;
156609
+ }
156610
+ const { rank, fields, links } = args;
156611
+ this.rank = rank;
156612
+ layer ??= this.createLayer(true);
156613
+ layer.fields = fields;
156614
+ layer.links = links;
156615
+ }
156538
156616
  };
156539
156617
  var Layer2 = class {
156540
156618
  id;
@@ -157112,6 +157190,12 @@ var Cache2 = class {
157112
157190
  config() {
157113
157191
  return this._internal_unstable.config;
157114
157192
  }
157193
+ serialize() {
157194
+ return this._internal_unstable.storage.serialize();
157195
+ }
157196
+ hydrate(...args) {
157197
+ return this._internal_unstable.storage.hydrate(...args);
157198
+ }
157115
157199
  clearLayer(layerID) {
157116
157200
  const layer = this._internal_unstable.storage.getLayer(layerID);
157117
157201
  if (!layer) {
@@ -89549,6 +89549,7 @@ __export(fs_exports, {
89549
89549
  recursiveCopy: () => recursiveCopy,
89550
89550
  remove: () => remove,
89551
89551
  rmdir: () => rmdir,
89552
+ snapshot: () => snapshot,
89552
89553
  stat: () => stat,
89553
89554
  writeFile: () => writeFile
89554
89555
  });
@@ -89735,16 +89736,17 @@ function existsSync(dirPath) {
89735
89736
  }
89736
89737
  return import_memfs.fs.existsSync(dirPath);
89737
89738
  }
89738
- async function readdir(filepath) {
89739
+ async function readdir(filepath, opts) {
89739
89740
  if (!houdini_mode.is_testing) {
89740
- return await fs.readdir(filepath);
89741
+ return await fs.readdir(filepath, opts);
89741
89742
  }
89742
89743
  if (filepath.includes("build/runtime")) {
89743
- return await fs.readdir(filepath);
89744
+ return await fs.readdir(filepath, opts);
89744
89745
  }
89745
89746
  try {
89746
- return import_memfs.fs.readdirSync(filepath);
89747
- } catch {
89747
+ return import_memfs.fs.readdirSync(filepath, opts);
89748
+ } catch (e22) {
89749
+ console.log(e22);
89748
89750
  return [];
89749
89751
  }
89750
89752
  }
@@ -89795,6 +89797,11 @@ async function recursiveCopy(source, target, transforms, notRoot) {
89795
89797
  );
89796
89798
  }
89797
89799
  }
89800
+ function snapshot(base) {
89801
+ return Object.fromEntries(
89802
+ Object.entries(import_memfs.vol.toJSON()).filter(([key]) => !base || key.startsWith(base)).map(([key, value2]) => [!base ? key : key.substring(base.length), value2])
89803
+ );
89804
+ }
89798
89805
  async function glob(pattern) {
89799
89806
  return await promisify(import_glob.glob)(posixify(pattern));
89800
89807
  }
@@ -90662,6 +90669,10 @@ var List = class {
90662
90669
  updates: ["append", "prepend"],
90663
90670
  selection: {
90664
90671
  fields: {
90672
+ __typename: {
90673
+ keyRaw: "__typename",
90674
+ type: "String"
90675
+ },
90665
90676
  node: {
90666
90677
  type: listType,
90667
90678
  keyRaw: "node",
@@ -90686,7 +90697,15 @@ var List = class {
90686
90697
  };
90687
90698
  insertData = {
90688
90699
  newEntry: {
90689
- edges: [{ node: { ...data2, __typename: listType } }]
90700
+ edges: [
90701
+ {
90702
+ __typename: listType + "Edge",
90703
+ node: {
90704
+ ...data2,
90705
+ __typename: listType
90706
+ }
90707
+ }
90708
+ ]
90690
90709
  }
90691
90710
  };
90692
90711
  } else {
@@ -91110,6 +91129,23 @@ var InMemoryStorage = class {
91110
91129
  }
91111
91130
  return this.data[this.data.length - 1];
91112
91131
  }
91132
+ serialize() {
91133
+ return JSON.stringify({
91134
+ rank: this.rank,
91135
+ fields: this.topLayer.fields,
91136
+ links: this.topLayer.links
91137
+ });
91138
+ }
91139
+ hydrate(args, layer) {
91140
+ if (!args) {
91141
+ return;
91142
+ }
91143
+ const { rank, fields, links } = args;
91144
+ this.rank = rank;
91145
+ layer ??= this.createLayer(true);
91146
+ layer.fields = fields;
91147
+ layer.links = links;
91148
+ }
91113
91149
  };
91114
91150
  var Layer = class {
91115
91151
  id;
@@ -91687,6 +91723,12 @@ var Cache = class {
91687
91723
  config() {
91688
91724
  return this._internal_unstable.config;
91689
91725
  }
91726
+ serialize() {
91727
+ return this._internal_unstable.storage.serialize();
91728
+ }
91729
+ hydrate(...args) {
91730
+ return this._internal_unstable.storage.hydrate(...args);
91731
+ }
91690
91732
  clearLayer(layerID) {
91691
91733
  const layer = this._internal_unstable.storage.getLayer(layerID);
91692
91734
  if (!layer) {
@@ -92717,7 +92759,7 @@ function deepMerge2(filepath, ...targets) {
92717
92759
  });
92718
92760
  }
92719
92761
  }
92720
- async function parseJS(str, config4) {
92762
+ function parseJS(str, config4) {
92721
92763
  const defaultConfig = {
92722
92764
  plugins: ["typescript", "importAssertions"],
92723
92765
  sourceType: "module"
@@ -154978,6 +155020,7 @@ __export2(fs_exports2, {
154978
155020
  recursiveCopy: () => recursiveCopy2,
154979
155021
  remove: () => remove2,
154980
155022
  rmdir: () => rmdir2,
155023
+ snapshot: () => snapshot2,
154981
155024
  stat: () => stat3,
154982
155025
  writeFile: () => writeFile2
154983
155026
  });
@@ -155164,16 +155207,17 @@ function existsSync2(dirPath) {
155164
155207
  }
155165
155208
  return import_memfs2.fs.existsSync(dirPath);
155166
155209
  }
155167
- async function readdir2(filepath) {
155210
+ async function readdir2(filepath, opts) {
155168
155211
  if (!houdini_mode2.is_testing) {
155169
- return await fs3.readdir(filepath);
155212
+ return await fs3.readdir(filepath, opts);
155170
155213
  }
155171
155214
  if (filepath.includes("build/runtime")) {
155172
- return await fs3.readdir(filepath);
155215
+ return await fs3.readdir(filepath, opts);
155173
155216
  }
155174
155217
  try {
155175
- return import_memfs2.fs.readdirSync(filepath);
155176
- } catch {
155218
+ return import_memfs2.fs.readdirSync(filepath, opts);
155219
+ } catch (e22) {
155220
+ console.log(e22);
155177
155221
  return [];
155178
155222
  }
155179
155223
  }
@@ -155224,6 +155268,11 @@ async function recursiveCopy2(source, target, transforms, notRoot) {
155224
155268
  );
155225
155269
  }
155226
155270
  }
155271
+ function snapshot2(base) {
155272
+ return Object.fromEntries(
155273
+ Object.entries(import_memfs2.vol.toJSON()).filter(([key]) => !base || key.startsWith(base)).map(([key, value2]) => [!base ? key : key.substring(base.length), value2])
155274
+ );
155275
+ }
155227
155276
  async function glob2(pattern) {
155228
155277
  return await promisify3(import_glob2.glob)(posixify2(pattern));
155229
155278
  }
@@ -156077,6 +156126,10 @@ var List2 = class {
156077
156126
  updates: ["append", "prepend"],
156078
156127
  selection: {
156079
156128
  fields: {
156129
+ __typename: {
156130
+ keyRaw: "__typename",
156131
+ type: "String"
156132
+ },
156080
156133
  node: {
156081
156134
  type: listType,
156082
156135
  keyRaw: "node",
@@ -156101,7 +156154,15 @@ var List2 = class {
156101
156154
  };
156102
156155
  insertData = {
156103
156156
  newEntry: {
156104
- edges: [{ node: { ...data2, __typename: listType } }]
156157
+ edges: [
156158
+ {
156159
+ __typename: listType + "Edge",
156160
+ node: {
156161
+ ...data2,
156162
+ __typename: listType
156163
+ }
156164
+ }
156165
+ ]
156105
156166
  }
156106
156167
  };
156107
156168
  } else {
@@ -156525,6 +156586,23 @@ var InMemoryStorage2 = class {
156525
156586
  }
156526
156587
  return this.data[this.data.length - 1];
156527
156588
  }
156589
+ serialize() {
156590
+ return JSON.stringify({
156591
+ rank: this.rank,
156592
+ fields: this.topLayer.fields,
156593
+ links: this.topLayer.links
156594
+ });
156595
+ }
156596
+ hydrate(args, layer) {
156597
+ if (!args) {
156598
+ return;
156599
+ }
156600
+ const { rank, fields, links } = args;
156601
+ this.rank = rank;
156602
+ layer ??= this.createLayer(true);
156603
+ layer.fields = fields;
156604
+ layer.links = links;
156605
+ }
156528
156606
  };
156529
156607
  var Layer2 = class {
156530
156608
  id;
@@ -157102,6 +157180,12 @@ var Cache2 = class {
157102
157180
  config() {
157103
157181
  return this._internal_unstable.config;
157104
157182
  }
157183
+ serialize() {
157184
+ return this._internal_unstable.storage.serialize();
157185
+ }
157186
+ hydrate(...args) {
157187
+ return this._internal_unstable.storage.hydrate(...args);
157188
+ }
157105
157189
  clearLayer(layerID) {
157106
157190
  const layer = this._internal_unstable.storage.getLayer(layerID);
157107
157191
  if (!layer) {
@@ -92295,6 +92295,7 @@ __export2(fs_exports, {
92295
92295
  recursiveCopy: () => recursiveCopy,
92296
92296
  remove: () => remove,
92297
92297
  rmdir: () => rmdir,
92298
+ snapshot: () => snapshot,
92298
92299
  stat: () => stat,
92299
92300
  writeFile: () => writeFile
92300
92301
  });
@@ -92481,16 +92482,17 @@ function existsSync(dirPath) {
92481
92482
  }
92482
92483
  return import_memfs.fs.existsSync(dirPath);
92483
92484
  }
92484
- async function readdir(filepath) {
92485
+ async function readdir(filepath, opts) {
92485
92486
  if (!houdini_mode.is_testing) {
92486
- return await import_promises.default.readdir(filepath);
92487
+ return await import_promises.default.readdir(filepath, opts);
92487
92488
  }
92488
92489
  if (filepath.includes("build/runtime")) {
92489
- return await import_promises.default.readdir(filepath);
92490
+ return await import_promises.default.readdir(filepath, opts);
92490
92491
  }
92491
92492
  try {
92492
- return import_memfs.fs.readdirSync(filepath);
92493
- } catch {
92493
+ return import_memfs.fs.readdirSync(filepath, opts);
92494
+ } catch (e22) {
92495
+ console.log(e22);
92494
92496
  return [];
92495
92497
  }
92496
92498
  }
@@ -92541,6 +92543,11 @@ async function recursiveCopy(source, target, transforms, notRoot) {
92541
92543
  );
92542
92544
  }
92543
92545
  }
92546
+ function snapshot(base) {
92547
+ return Object.fromEntries(
92548
+ Object.entries(import_memfs.vol.toJSON()).filter(([key]) => !base || key.startsWith(base)).map(([key, value2]) => [!base ? key : key.substring(base.length), value2])
92549
+ );
92550
+ }
92544
92551
  async function glob(pattern) {
92545
92552
  return await (0, import_node_util.promisify)(import_glob.glob)(posixify(pattern));
92546
92553
  }
@@ -93971,6 +93978,10 @@ var List = class {
93971
93978
  updates: ["append", "prepend"],
93972
93979
  selection: {
93973
93980
  fields: {
93981
+ __typename: {
93982
+ keyRaw: "__typename",
93983
+ type: "String"
93984
+ },
93974
93985
  node: {
93975
93986
  type: listType,
93976
93987
  keyRaw: "node",
@@ -93995,7 +94006,15 @@ var List = class {
93995
94006
  };
93996
94007
  insertData = {
93997
94008
  newEntry: {
93998
- edges: [{ node: { ...data2, __typename: listType } }]
94009
+ edges: [
94010
+ {
94011
+ __typename: listType + "Edge",
94012
+ node: {
94013
+ ...data2,
94014
+ __typename: listType
94015
+ }
94016
+ }
94017
+ ]
93999
94018
  }
94000
94019
  };
94001
94020
  } else {
@@ -94419,6 +94438,23 @@ var InMemoryStorage = class {
94419
94438
  }
94420
94439
  return this.data[this.data.length - 1];
94421
94440
  }
94441
+ serialize() {
94442
+ return JSON.stringify({
94443
+ rank: this.rank,
94444
+ fields: this.topLayer.fields,
94445
+ links: this.topLayer.links
94446
+ });
94447
+ }
94448
+ hydrate(args, layer) {
94449
+ if (!args) {
94450
+ return;
94451
+ }
94452
+ const { rank, fields, links } = args;
94453
+ this.rank = rank;
94454
+ layer ??= this.createLayer(true);
94455
+ layer.fields = fields;
94456
+ layer.links = links;
94457
+ }
94422
94458
  };
94423
94459
  var Layer = class {
94424
94460
  id;
@@ -94996,6 +95032,12 @@ var Cache = class {
94996
95032
  config() {
94997
95033
  return this._internal_unstable.config;
94998
95034
  }
95035
+ serialize() {
95036
+ return this._internal_unstable.storage.serialize();
95037
+ }
95038
+ hydrate(...args) {
95039
+ return this._internal_unstable.storage.hydrate(...args);
95040
+ }
94999
95041
  clearLayer(layerID) {
95000
95042
  const layer = this._internal_unstable.storage.getLayer(layerID);
95001
95043
  if (!layer) {
@@ -96807,7 +96849,7 @@ function deepMerge2(filepath, ...targets) {
96807
96849
  });
96808
96850
  }
96809
96851
  }
96810
- async function parseJS(str, config4) {
96852
+ function parseJS(str, config4) {
96811
96853
  const defaultConfig = {
96812
96854
  plugins: ["typescript", "importAssertions"],
96813
96855
  sourceType: "module"
@@ -186611,6 +186653,7 @@ __export3(fs_exports2, {
186611
186653
  recursiveCopy: () => recursiveCopy2,
186612
186654
  remove: () => remove2,
186613
186655
  rmdir: () => rmdir2,
186656
+ snapshot: () => snapshot2,
186614
186657
  stat: () => stat3,
186615
186658
  writeFile: () => writeFile2
186616
186659
  });
@@ -186797,16 +186840,17 @@ function existsSync2(dirPath) {
186797
186840
  }
186798
186841
  return import_memfs2.fs.existsSync(dirPath);
186799
186842
  }
186800
- async function readdir2(filepath) {
186843
+ async function readdir2(filepath, opts) {
186801
186844
  if (!houdini_mode2.is_testing) {
186802
- return await import_promises2.default.readdir(filepath);
186845
+ return await import_promises2.default.readdir(filepath, opts);
186803
186846
  }
186804
186847
  if (filepath.includes("build/runtime")) {
186805
- return await import_promises2.default.readdir(filepath);
186848
+ return await import_promises2.default.readdir(filepath, opts);
186806
186849
  }
186807
186850
  try {
186808
- return import_memfs2.fs.readdirSync(filepath);
186809
- } catch {
186851
+ return import_memfs2.fs.readdirSync(filepath, opts);
186852
+ } catch (e22) {
186853
+ console.log(e22);
186810
186854
  return [];
186811
186855
  }
186812
186856
  }
@@ -186857,6 +186901,11 @@ async function recursiveCopy2(source, target, transforms, notRoot) {
186857
186901
  );
186858
186902
  }
186859
186903
  }
186904
+ function snapshot2(base) {
186905
+ return Object.fromEntries(
186906
+ Object.entries(import_memfs2.vol.toJSON()).filter(([key]) => !base || key.startsWith(base)).map(([key, value2]) => [!base ? key : key.substring(base.length), value2])
186907
+ );
186908
+ }
186860
186909
  async function glob2(pattern) {
186861
186910
  return await (0, import_node_util5.promisify)(import_glob2.glob)(posixify2(pattern));
186862
186911
  }
@@ -187710,6 +187759,10 @@ var List3 = class {
187710
187759
  updates: ["append", "prepend"],
187711
187760
  selection: {
187712
187761
  fields: {
187762
+ __typename: {
187763
+ keyRaw: "__typename",
187764
+ type: "String"
187765
+ },
187713
187766
  node: {
187714
187767
  type: listType,
187715
187768
  keyRaw: "node",
@@ -187734,7 +187787,15 @@ var List3 = class {
187734
187787
  };
187735
187788
  insertData = {
187736
187789
  newEntry: {
187737
- edges: [{ node: { ...data2, __typename: listType } }]
187790
+ edges: [
187791
+ {
187792
+ __typename: listType + "Edge",
187793
+ node: {
187794
+ ...data2,
187795
+ __typename: listType
187796
+ }
187797
+ }
187798
+ ]
187738
187799
  }
187739
187800
  };
187740
187801
  } else {
@@ -188158,6 +188219,23 @@ var InMemoryStorage2 = class {
188158
188219
  }
188159
188220
  return this.data[this.data.length - 1];
188160
188221
  }
188222
+ serialize() {
188223
+ return JSON.stringify({
188224
+ rank: this.rank,
188225
+ fields: this.topLayer.fields,
188226
+ links: this.topLayer.links
188227
+ });
188228
+ }
188229
+ hydrate(args, layer) {
188230
+ if (!args) {
188231
+ return;
188232
+ }
188233
+ const { rank, fields, links } = args;
188234
+ this.rank = rank;
188235
+ layer ??= this.createLayer(true);
188236
+ layer.fields = fields;
188237
+ layer.links = links;
188238
+ }
188161
188239
  };
188162
188240
  var Layer2 = class {
188163
188241
  id;
@@ -188735,6 +188813,12 @@ var Cache2 = class {
188735
188813
  config() {
188736
188814
  return this._internal_unstable.config;
188737
188815
  }
188816
+ serialize() {
188817
+ return this._internal_unstable.storage.serialize();
188818
+ }
188819
+ hydrate(...args) {
188820
+ return this._internal_unstable.storage.hydrate(...args);
188821
+ }
188738
188822
  clearLayer(layerID) {
188739
188823
  const layer = this._internal_unstable.storage.getLayer(layerID);
188740
188824
  if (!layer) {