sveltekit-data-plugin 1.4.3 → 1.4.5

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/plugin.js CHANGED
@@ -137,7 +137,13 @@
137
137
  relative: relativeFolder
138
138
  });
139
139
  return `
140
- ${Object.entries(attributes).map(([key, value]) => `export const ${key} = ${JSON.stringify(value)};`).join("\n")}
140
+ ${Object.entries({
141
+ ...attributes,
142
+ _internal: {
143
+ id: path.basename(id),
144
+ absolute: id
145
+ }
146
+ }).map(([key, value]) => `export const ${key} = ${JSON.stringify(value)};`).join("\n")}
141
147
  export const body = ${JSON.stringify(d.body)};`;
142
148
  }
143
149
  }
package/dist/plugin.mjs CHANGED
@@ -136,7 +136,13 @@ function importDataPlugin(imagetools_plugin, { base = "./src/data" } = {}) {
136
136
  relative: relativeFolder
137
137
  });
138
138
  return `
139
- ${Object.entries(attributes).map(([key, value]) => `export const ${key} = ${JSON.stringify(value)};`).join("\n")}
139
+ ${Object.entries({
140
+ ...attributes,
141
+ _internal: {
142
+ id: path.basename(id),
143
+ absolute: id
144
+ }
145
+ }).map(([key, value]) => `export const ${key} = ${JSON.stringify(value)};`).join("\n")}
140
146
  export const body = ${JSON.stringify(d.body)};`;
141
147
  }
142
148
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sveltekit-data-plugin",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "author": {
5
5
  "name": "Jonny Thaw",
6
6
  "url": "https://jthaw.me"