houdini-svelte 1.0.0-next.14 → 1.0.0-next.15

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,5 +1,7 @@
1
1
  import type { TransformPage } from 'houdini/vite';
2
+ import type { SourceMapInput } from 'rollup';
2
3
  import type { Framework } from '../kit';
3
4
  export default function apply_transforms(framework: Framework, page: TransformPage): Promise<{
4
5
  code: string;
6
+ map?: SourceMapInput;
5
7
  }>;
@@ -48649,7 +48649,7 @@ var require_jsonfile = __commonJS2({
48649
48649
  }
48650
48650
  var universalify = require_universalify();
48651
48651
  var { stringify, stripBom } = require_utils2();
48652
- async function _readFile(file, options = {}) {
48652
+ async function _readFile2(file, options = {}) {
48653
48653
  if (typeof options === "string") {
48654
48654
  options = { encoding: options };
48655
48655
  }
@@ -48670,7 +48670,7 @@ var require_jsonfile = __commonJS2({
48670
48670
  }
48671
48671
  return obj;
48672
48672
  }
48673
- var readFile22 = universalify.fromPromise(_readFile);
48673
+ var readFile22 = universalify.fromPromise(_readFile2);
48674
48674
  function readFileSync22(file, options = {}) {
48675
48675
  if (typeof options === "string") {
48676
48676
  options = { encoding: options };
@@ -111468,7 +111468,7 @@ var require_jsonfile3 = __commonJS3({
111468
111468
  }
111469
111469
  var universalify = require_universalify2();
111470
111470
  var { stringify: stringify2, stripBom } = require_utils4();
111471
- async function _readFile(file, options = {}) {
111471
+ async function _readFile2(file, options = {}) {
111472
111472
  if (typeof options === "string") {
111473
111473
  options = { encoding: options };
111474
111474
  }
@@ -111489,7 +111489,7 @@ var require_jsonfile3 = __commonJS3({
111489
111489
  }
111490
111490
  return obj;
111491
111491
  }
111492
- var readFile22 = universalify.fromPromise(_readFile);
111492
+ var readFile22 = universalify.fromPromise(_readFile2);
111493
111493
  function readFileSync22(file, options = {}) {
111494
111494
  if (typeof options === "string") {
111495
111495
  options = { encoding: options };
@@ -182692,6 +182692,7 @@ async function codegen_default(input) {
182692
182692
 
182693
182693
  // src/plugin/fsPatch.ts
182694
182694
  var import_node_fs3 = __toESM(require("node:fs"), 1);
182695
+ var import_promises3 = __toESM(require("node:fs/promises"), 1);
182695
182696
  var fsPatch_default = (getFramwork) => ({
182696
182697
  async resolveId(filepath, _, { config: config4, isEntry }) {
182697
182698
  if (!isEntry) {
@@ -182811,6 +182812,22 @@ Object.defineProperty(globalThis, "fs", {
182811
182812
  enumerable: true,
182812
182813
  value: import_node_fs3.default
182813
182814
  });
182815
+ var _readFile = import_promises3.default.readFile;
182816
+ import_promises3.default.readFile = async (path3, options) => {
182817
+ if (path3.toString().endsWith("+layout.svelte")) {
182818
+ try {
182819
+ return await _readFile(path3, options);
182820
+ } catch {
182821
+ return typeof options === "string" || options?.encoding ? empty_layout : Buffer.from(empty_layout);
182822
+ }
182823
+ }
182824
+ return _readFile(path3, options);
182825
+ };
182826
+ Object.defineProperty(globalThis, "fs/promises", {
182827
+ configurable: true,
182828
+ enumerable: true,
182829
+ value: import_promises3.default
182830
+ });
182814
182831
  function virtual_file(name, options) {
182815
182832
  return !options?.withFileTypes ? name : {
182816
182833
  name,
@@ -183662,7 +183679,7 @@ async function apply_transforms(framework2, page2) {
183662
183679
  script = await parseJS(page2.content);
183663
183680
  }
183664
183681
  } catch (e3) {
183665
- return { code: page2.content };
183682
+ return { code: page2.content, map: page2.map };
183666
183683
  }
183667
183684
  if (script === null) {
183668
183685
  script = {
@@ -183685,9 +183702,12 @@ async function apply_transforms(framework2, page2) {
183685
183702
  formatErrors({ message: e3.message, filepath: page2.filepath });
183686
183703
  return { code: page2.content };
183687
183704
  }
183688
- const printedScript = recast21.print(result.script).code;
183705
+ const { code, map } = recast21.print(result.script, {
183706
+ inputSourceMap: page2.map
183707
+ });
183689
183708
  return {
183690
- code: !page2.filepath.endsWith(".svelte") ? printedScript : replace_tag_content(page2.content, script.start, script.end, printedScript)
183709
+ code: !page2.filepath.endsWith(".svelte") ? code : replace_tag_content(page2.content, script.start, script.end, code),
183710
+ map
183691
183711
  };
183692
183712
  }
183693
183713
  function replace_tag_content(source, start, end, insert2) {
@@ -48644,7 +48644,7 @@ var require_jsonfile = __commonJS2({
48644
48644
  }
48645
48645
  var universalify = require_universalify();
48646
48646
  var { stringify, stripBom } = require_utils2();
48647
- async function _readFile(file, options = {}) {
48647
+ async function _readFile2(file, options = {}) {
48648
48648
  if (typeof options === "string") {
48649
48649
  options = { encoding: options };
48650
48650
  }
@@ -48665,7 +48665,7 @@ var require_jsonfile = __commonJS2({
48665
48665
  }
48666
48666
  return obj;
48667
48667
  }
48668
- var readFile22 = universalify.fromPromise(_readFile);
48668
+ var readFile22 = universalify.fromPromise(_readFile2);
48669
48669
  function readFileSync22(file, options = {}) {
48670
48670
  if (typeof options === "string") {
48671
48671
  options = { encoding: options };
@@ -111462,7 +111462,7 @@ var require_jsonfile3 = __commonJS3({
111462
111462
  }
111463
111463
  var universalify = require_universalify2();
111464
111464
  var { stringify: stringify2, stripBom } = require_utils4();
111465
- async function _readFile(file, options = {}) {
111465
+ async function _readFile2(file, options = {}) {
111466
111466
  if (typeof options === "string") {
111467
111467
  options = { encoding: options };
111468
111468
  }
@@ -111483,7 +111483,7 @@ var require_jsonfile3 = __commonJS3({
111483
111483
  }
111484
111484
  return obj;
111485
111485
  }
111486
- var readFile22 = universalify.fromPromise(_readFile);
111486
+ var readFile22 = universalify.fromPromise(_readFile2);
111487
111487
  function readFileSync22(file, options = {}) {
111488
111488
  if (typeof options === "string") {
111489
111489
  options = { encoding: options };
@@ -182686,6 +182686,7 @@ async function codegen_default(input) {
182686
182686
 
182687
182687
  // src/plugin/fsPatch.ts
182688
182688
  import filesystem, { Dirent } from "node:fs";
182689
+ import filesystemPromises from "node:fs/promises";
182689
182690
  var fsPatch_default = (getFramwork) => ({
182690
182691
  async resolveId(filepath, _, { config: config4, isEntry }) {
182691
182692
  if (!isEntry) {
@@ -182805,6 +182806,22 @@ Object.defineProperty(globalThis, "fs", {
182805
182806
  enumerable: true,
182806
182807
  value: filesystem
182807
182808
  });
182809
+ var _readFile = filesystemPromises.readFile;
182810
+ filesystemPromises.readFile = async (path3, options) => {
182811
+ if (path3.toString().endsWith("+layout.svelte")) {
182812
+ try {
182813
+ return await _readFile(path3, options);
182814
+ } catch {
182815
+ return typeof options === "string" || options?.encoding ? empty_layout : Buffer.from(empty_layout);
182816
+ }
182817
+ }
182818
+ return _readFile(path3, options);
182819
+ };
182820
+ Object.defineProperty(globalThis, "fs/promises", {
182821
+ configurable: true,
182822
+ enumerable: true,
182823
+ value: filesystemPromises
182824
+ });
182808
182825
  function virtual_file(name, options) {
182809
182826
  return !options?.withFileTypes ? name : {
182810
182827
  name,
@@ -183656,7 +183673,7 @@ async function apply_transforms(framework2, page2) {
183656
183673
  script = await parseJS(page2.content);
183657
183674
  }
183658
183675
  } catch (e3) {
183659
- return { code: page2.content };
183676
+ return { code: page2.content, map: page2.map };
183660
183677
  }
183661
183678
  if (script === null) {
183662
183679
  script = {
@@ -183679,9 +183696,12 @@ async function apply_transforms(framework2, page2) {
183679
183696
  formatErrors({ message: e3.message, filepath: page2.filepath });
183680
183697
  return { code: page2.content };
183681
183698
  }
183682
- const printedScript = recast21.print(result.script).code;
183699
+ const { code, map } = recast21.print(result.script, {
183700
+ inputSourceMap: page2.map
183701
+ });
183683
183702
  return {
183684
- code: !page2.filepath.endsWith(".svelte") ? printedScript : replace_tag_content(page2.content, script.start, script.end, printedScript)
183703
+ code: !page2.filepath.endsWith(".svelte") ? code : replace_tag_content(page2.content, script.start, script.end, code),
183704
+ map
183685
183705
  };
183686
183706
  }
183687
183707
  function replace_tag_content(source, start, end, insert2) {
@@ -14,5 +14,6 @@ export default function houdiniPreprocessor(extraConfig: {
14
14
  filename: string;
15
15
  }): Promise<{
16
16
  code: string;
17
+ map?: import("rollup").SourceMapInput | undefined;
17
18
  }>;
18
19
  };
@@ -186486,7 +186486,7 @@ async function apply_transforms(framework, page2) {
186486
186486
  script = await parseJS(page2.content);
186487
186487
  }
186488
186488
  } catch (e3) {
186489
- return { code: page2.content };
186489
+ return { code: page2.content, map: page2.map };
186490
186490
  }
186491
186491
  if (script === null) {
186492
186492
  script = {
@@ -186509,9 +186509,12 @@ async function apply_transforms(framework, page2) {
186509
186509
  formatErrors({ message: e3.message, filepath: page2.filepath });
186510
186510
  return { code: page2.content };
186511
186511
  }
186512
- const printedScript = recast20.print(result.script).code;
186512
+ const { code, map } = recast20.print(result.script, {
186513
+ inputSourceMap: page2.map
186514
+ });
186513
186515
  return {
186514
- code: !page2.filepath.endsWith(".svelte") ? printedScript : replace_tag_content(page2.content, script.start, script.end, printedScript)
186516
+ code: !page2.filepath.endsWith(".svelte") ? code : replace_tag_content(page2.content, script.start, script.end, code),
186517
+ map
186515
186518
  };
186516
186519
  }
186517
186520
  function replace_tag_content(source, start, end, insert2) {
@@ -186478,7 +186478,7 @@ async function apply_transforms(framework, page2) {
186478
186478
  script = await parseJS(page2.content);
186479
186479
  }
186480
186480
  } catch (e3) {
186481
- return { code: page2.content };
186481
+ return { code: page2.content, map: page2.map };
186482
186482
  }
186483
186483
  if (script === null) {
186484
186484
  script = {
@@ -186501,9 +186501,12 @@ async function apply_transforms(framework, page2) {
186501
186501
  formatErrors({ message: e3.message, filepath: page2.filepath });
186502
186502
  return { code: page2.content };
186503
186503
  }
186504
- const printedScript = recast20.print(result.script).code;
186504
+ const { code, map } = recast20.print(result.script, {
186505
+ inputSourceMap: page2.map
186506
+ });
186505
186507
  return {
186506
- code: !page2.filepath.endsWith(".svelte") ? printedScript : replace_tag_content(page2.content, script.start, script.end, printedScript)
186508
+ code: !page2.filepath.endsWith(".svelte") ? code : replace_tag_content(page2.content, script.start, script.end, code),
186509
+ map
186507
186510
  };
186508
186511
  }
186509
186512
  function replace_tag_content(source, start, end, insert2) {
@@ -48652,7 +48652,7 @@ var require_jsonfile = __commonJS2({
48652
48652
  }
48653
48653
  var universalify = require_universalify();
48654
48654
  var { stringify, stripBom } = require_utils2();
48655
- async function _readFile(file, options = {}) {
48655
+ async function _readFile2(file, options = {}) {
48656
48656
  if (typeof options === "string") {
48657
48657
  options = { encoding: options };
48658
48658
  }
@@ -48673,7 +48673,7 @@ var require_jsonfile = __commonJS2({
48673
48673
  }
48674
48674
  return obj;
48675
48675
  }
48676
- var readFile22 = universalify.fromPromise(_readFile);
48676
+ var readFile22 = universalify.fromPromise(_readFile2);
48677
48677
  function readFileSync22(file, options = {}) {
48678
48678
  if (typeof options === "string") {
48679
48679
  options = { encoding: options };
@@ -108085,7 +108085,7 @@ var require_jsonfile3 = __commonJS3({
108085
108085
  }
108086
108086
  var universalify = require_universalify2();
108087
108087
  var { stringify, stripBom } = require_utils22();
108088
- async function _readFile(file, options = {}) {
108088
+ async function _readFile2(file, options = {}) {
108089
108089
  if (typeof options === "string") {
108090
108090
  options = { encoding: options };
108091
108091
  }
@@ -108106,7 +108106,7 @@ var require_jsonfile3 = __commonJS3({
108106
108106
  }
108107
108107
  return obj;
108108
108108
  }
108109
- var readFile22 = universalify.fromPromise(_readFile);
108109
+ var readFile22 = universalify.fromPromise(_readFile2);
108110
108110
  function readFileSync22(file, options = {}) {
108111
108111
  if (typeof options === "string") {
108112
108112
  options = { encoding: options };
@@ -144412,7 +144412,7 @@ function getRootType(type) {
144412
144412
  function hashDocument({
144413
144413
  document: document2
144414
144414
  }) {
144415
- const docString = typeof document2 === "string" ? document2 : document2.artifact?.raw;
144415
+ const docString = typeof document2 === "string" ? document2 : document2.originalString;
144416
144416
  return import_node_crypto.default.createHash("sha256").update(docString ?? "").digest("hex");
144417
144417
  }
144418
144418
  function parentTypeFromAncestors(schema2, filepath, ancestors) {
@@ -146878,7 +146878,7 @@ function artifactGenerator(stats) {
146878
146878
  return;
146879
146879
  }
146880
146880
  const match = existingArtifact && existingArtifact.match(/"HoudiniHash=(\w+)"/);
146881
- if (match && match[1] !== hash({ config: config22, document: doc })) {
146881
+ if (match && match[1] !== artifact.hash) {
146882
146882
  stats.changed.push(artifact.name);
146883
146883
  }
146884
146884
  stats.total.push(artifact.name);
@@ -170430,7 +170430,7 @@ var require_jsonfile4 = __commonJS4({
170430
170430
  }
170431
170431
  var universalify = require_universalify3();
170432
170432
  var { stringify, stripBom } = require_utils23();
170433
- async function _readFile(file, options = {}) {
170433
+ async function _readFile2(file, options = {}) {
170434
170434
  if (typeof options === "string") {
170435
170435
  options = { encoding: options };
170436
170436
  }
@@ -170451,7 +170451,7 @@ var require_jsonfile4 = __commonJS4({
170451
170451
  }
170452
170452
  return obj;
170453
170453
  }
170454
- var readFile22 = universalify.fromPromise(_readFile);
170454
+ var readFile22 = universalify.fromPromise(_readFile2);
170455
170455
  function readFileSync22(file, options = {}) {
170456
170456
  if (typeof options === "string") {
170457
170457
  options = { encoding: options };
@@ -225148,7 +225148,7 @@ var require_jsonfile5 = __commonJS5({
225148
225148
  }
225149
225149
  var universalify = require_universalify4();
225150
225150
  var { stringify: stringify2, stripBom } = require_utils42();
225151
- async function _readFile(file, options = {}) {
225151
+ async function _readFile2(file, options = {}) {
225152
225152
  if (typeof options === "string") {
225153
225153
  options = { encoding: options };
225154
225154
  }
@@ -225169,7 +225169,7 @@ var require_jsonfile5 = __commonJS5({
225169
225169
  }
225170
225170
  return obj;
225171
225171
  }
225172
- var readFile22 = universalify.fromPromise(_readFile);
225172
+ var readFile22 = universalify.fromPromise(_readFile2);
225173
225173
  function readFileSync22(file, options = {}) {
225174
225174
  if (typeof options === "string") {
225175
225175
  options = { encoding: options };
@@ -296372,6 +296372,7 @@ async function codegen_default(input) {
296372
296372
 
296373
296373
  // src/plugin/fsPatch.ts
296374
296374
  var import_node_fs3 = __toESM(require("node:fs"), 1);
296375
+ var import_promises5 = __toESM(require("node:fs/promises"), 1);
296375
296376
  var fsPatch_default = (getFramwork) => ({
296376
296377
  async resolveId(filepath, _, { config: config5, isEntry }) {
296377
296378
  if (!isEntry) {
@@ -296491,6 +296492,22 @@ Object.defineProperty(globalThis, "fs", {
296491
296492
  enumerable: true,
296492
296493
  value: import_node_fs3.default
296493
296494
  });
296495
+ var _readFile = import_promises5.default.readFile;
296496
+ import_promises5.default.readFile = async (path5, options) => {
296497
+ if (path5.toString().endsWith("+layout.svelte")) {
296498
+ try {
296499
+ return await _readFile(path5, options);
296500
+ } catch {
296501
+ return typeof options === "string" || options?.encoding ? empty_layout : Buffer.from(empty_layout);
296502
+ }
296503
+ }
296504
+ return _readFile(path5, options);
296505
+ };
296506
+ Object.defineProperty(globalThis, "fs/promises", {
296507
+ configurable: true,
296508
+ enumerable: true,
296509
+ value: import_promises5.default
296510
+ });
296494
296511
  function virtual_file(name, options) {
296495
296512
  return !options?.withFileTypes ? name : {
296496
296513
  name,
@@ -297342,7 +297359,7 @@ async function apply_transforms(framework2, page2) {
297342
297359
  script = await parseJS(page2.content);
297343
297360
  }
297344
297361
  } catch (e3) {
297345
- return { code: page2.content };
297362
+ return { code: page2.content, map: page2.map };
297346
297363
  }
297347
297364
  if (script === null) {
297348
297365
  script = {
@@ -297365,9 +297382,12 @@ async function apply_transforms(framework2, page2) {
297365
297382
  formatErrors({ message: e3.message, filepath: page2.filepath });
297366
297383
  return { code: page2.content };
297367
297384
  }
297368
- const printedScript = recast25.print(result.script).code;
297385
+ const { code, map } = recast25.print(result.script, {
297386
+ inputSourceMap: page2.map
297387
+ });
297369
297388
  return {
297370
- code: !page2.filepath.endsWith(".svelte") ? printedScript : replace_tag_content(page2.content, script.start, script.end, printedScript)
297389
+ code: !page2.filepath.endsWith(".svelte") ? code : replace_tag_content(page2.content, script.start, script.end, code),
297390
+ map
297371
297391
  };
297372
297392
  }
297373
297393
  function replace_tag_content(source, start, end, insert2) {
@@ -48644,7 +48644,7 @@ var require_jsonfile = __commonJS2({
48644
48644
  }
48645
48645
  var universalify = require_universalify();
48646
48646
  var { stringify, stripBom } = require_utils2();
48647
- async function _readFile(file, options = {}) {
48647
+ async function _readFile2(file, options = {}) {
48648
48648
  if (typeof options === "string") {
48649
48649
  options = { encoding: options };
48650
48650
  }
@@ -48665,7 +48665,7 @@ var require_jsonfile = __commonJS2({
48665
48665
  }
48666
48666
  return obj;
48667
48667
  }
48668
- var readFile22 = universalify.fromPromise(_readFile);
48668
+ var readFile22 = universalify.fromPromise(_readFile2);
48669
48669
  function readFileSync22(file, options = {}) {
48670
48670
  if (typeof options === "string") {
48671
48671
  options = { encoding: options };
@@ -108076,7 +108076,7 @@ var require_jsonfile3 = __commonJS3({
108076
108076
  }
108077
108077
  var universalify = require_universalify2();
108078
108078
  var { stringify, stripBom } = require_utils22();
108079
- async function _readFile(file, options = {}) {
108079
+ async function _readFile2(file, options = {}) {
108080
108080
  if (typeof options === "string") {
108081
108081
  options = { encoding: options };
108082
108082
  }
@@ -108097,7 +108097,7 @@ var require_jsonfile3 = __commonJS3({
108097
108097
  }
108098
108098
  return obj;
108099
108099
  }
108100
- var readFile22 = universalify.fromPromise(_readFile);
108100
+ var readFile22 = universalify.fromPromise(_readFile2);
108101
108101
  function readFileSync22(file, options = {}) {
108102
108102
  if (typeof options === "string") {
108103
108103
  options = { encoding: options };
@@ -144403,7 +144403,7 @@ function getRootType(type) {
144403
144403
  function hashDocument({
144404
144404
  document: document2
144405
144405
  }) {
144406
- const docString = typeof document2 === "string" ? document2 : document2.artifact?.raw;
144406
+ const docString = typeof document2 === "string" ? document2 : document2.originalString;
144407
144407
  return crypto.createHash("sha256").update(docString ?? "").digest("hex");
144408
144408
  }
144409
144409
  function parentTypeFromAncestors(schema2, filepath, ancestors) {
@@ -146869,7 +146869,7 @@ function artifactGenerator(stats) {
146869
146869
  return;
146870
146870
  }
146871
146871
  const match = existingArtifact && existingArtifact.match(/"HoudiniHash=(\w+)"/);
146872
- if (match && match[1] !== hash({ config: config22, document: doc })) {
146872
+ if (match && match[1] !== artifact.hash) {
146873
146873
  stats.changed.push(artifact.name);
146874
146874
  }
146875
146875
  stats.total.push(artifact.name);
@@ -170420,7 +170420,7 @@ var require_jsonfile4 = __commonJS4({
170420
170420
  }
170421
170421
  var universalify = require_universalify3();
170422
170422
  var { stringify, stripBom } = require_utils23();
170423
- async function _readFile(file, options = {}) {
170423
+ async function _readFile2(file, options = {}) {
170424
170424
  if (typeof options === "string") {
170425
170425
  options = { encoding: options };
170426
170426
  }
@@ -170441,7 +170441,7 @@ var require_jsonfile4 = __commonJS4({
170441
170441
  }
170442
170442
  return obj;
170443
170443
  }
170444
- var readFile22 = universalify.fromPromise(_readFile);
170444
+ var readFile22 = universalify.fromPromise(_readFile2);
170445
170445
  function readFileSync22(file, options = {}) {
170446
170446
  if (typeof options === "string") {
170447
170447
  options = { encoding: options };
@@ -225137,7 +225137,7 @@ var require_jsonfile5 = __commonJS5({
225137
225137
  }
225138
225138
  var universalify = require_universalify4();
225139
225139
  var { stringify: stringify2, stripBom } = require_utils42();
225140
- async function _readFile(file, options = {}) {
225140
+ async function _readFile2(file, options = {}) {
225141
225141
  if (typeof options === "string") {
225142
225142
  options = { encoding: options };
225143
225143
  }
@@ -225158,7 +225158,7 @@ var require_jsonfile5 = __commonJS5({
225158
225158
  }
225159
225159
  return obj;
225160
225160
  }
225161
- var readFile22 = universalify.fromPromise(_readFile);
225161
+ var readFile22 = universalify.fromPromise(_readFile2);
225162
225162
  function readFileSync22(file, options = {}) {
225163
225163
  if (typeof options === "string") {
225164
225164
  options = { encoding: options };
@@ -296361,6 +296361,7 @@ async function codegen_default(input) {
296361
296361
 
296362
296362
  // src/plugin/fsPatch.ts
296363
296363
  import filesystem, { Dirent } from "node:fs";
296364
+ import filesystemPromises from "node:fs/promises";
296364
296365
  var fsPatch_default = (getFramwork) => ({
296365
296366
  async resolveId(filepath, _, { config: config5, isEntry }) {
296366
296367
  if (!isEntry) {
@@ -296480,6 +296481,22 @@ Object.defineProperty(globalThis, "fs", {
296480
296481
  enumerable: true,
296481
296482
  value: filesystem
296482
296483
  });
296484
+ var _readFile = filesystemPromises.readFile;
296485
+ filesystemPromises.readFile = async (path5, options) => {
296486
+ if (path5.toString().endsWith("+layout.svelte")) {
296487
+ try {
296488
+ return await _readFile(path5, options);
296489
+ } catch {
296490
+ return typeof options === "string" || options?.encoding ? empty_layout : Buffer.from(empty_layout);
296491
+ }
296492
+ }
296493
+ return _readFile(path5, options);
296494
+ };
296495
+ Object.defineProperty(globalThis, "fs/promises", {
296496
+ configurable: true,
296497
+ enumerable: true,
296498
+ value: filesystemPromises
296499
+ });
296483
296500
  function virtual_file(name, options) {
296484
296501
  return !options?.withFileTypes ? name : {
296485
296502
  name,
@@ -297331,7 +297348,7 @@ async function apply_transforms(framework2, page2) {
297331
297348
  script = await parseJS(page2.content);
297332
297349
  }
297333
297350
  } catch (e3) {
297334
- return { code: page2.content };
297351
+ return { code: page2.content, map: page2.map };
297335
297352
  }
297336
297353
  if (script === null) {
297337
297354
  script = {
@@ -297354,9 +297371,12 @@ async function apply_transforms(framework2, page2) {
297354
297371
  formatErrors({ message: e3.message, filepath: page2.filepath });
297355
297372
  return { code: page2.content };
297356
297373
  }
297357
- const printedScript = recast25.print(result.script).code;
297374
+ const { code, map } = recast25.print(result.script, {
297375
+ inputSourceMap: page2.map
297376
+ });
297358
297377
  return {
297359
- code: !page2.filepath.endsWith(".svelte") ? printedScript : replace_tag_content(page2.content, script.start, script.end, printedScript)
297378
+ code: !page2.filepath.endsWith(".svelte") ? code : replace_tag_content(page2.content, script.start, script.end, code),
297379
+ map
297360
297380
  };
297361
297381
  }
297362
297382
  function replace_tag_content(source, start, end, insert2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "houdini-svelte",
3
- "version": "1.0.0-next.14",
3
+ "version": "1.0.0-next.15",
4
4
  "description": "The svelte plugin for houdini",
5
5
  "keywords": [
6
6
  "typescript",
@@ -29,9 +29,10 @@
29
29
  "estree-walker": "^3.0.1",
30
30
  "graphql": "^15.8.0",
31
31
  "recast": "^0.23.1",
32
+ "rollup": "^3.7.4",
32
33
  "svelte": "^3.55.1",
33
34
  "vite": "^4.0.4",
34
- "houdini": "^1.0.0-next.14"
35
+ "houdini": "^1.0.0-next.15"
35
36
  },
36
37
  "files": [
37
38
  "build"