@dosgato/templating 0.0.101 → 0.0.102

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/component.js CHANGED
@@ -1,4 +1,4 @@
1
- import { get, isNotBlank, titleCase } from 'txstate-utils';
1
+ import { get, isNotBlank, printIf, titleCase } from 'txstate-utils';
2
2
  import { ResourceProvider } from './provider.js';
3
3
  function defaultWrap(info) { return info.output; }
4
4
  /**
@@ -291,7 +291,7 @@ export class Page extends Component {
291
291
  * Get a URL for the current page with a different extension
292
292
  */
293
293
  variationUrl(extension) {
294
- return `${this.url.replace(/\.\w+$/, '')}.${extension}`;
294
+ return `${this.url.replace(/\.\w+$/, '')}.${extension}${printIf(this.url.startsWith('/.edit/'), `?token=${this.reqQuery.token ?? ''}`)}`;
295
295
  }
296
296
  passError(e, path) {
297
297
  console.warn(`Recoverable issue occured during render of ${this.pageInfo.path}. Component at ${path} threw the following error:`, e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosgato/templating",
3
- "version": "0.0.101",
3
+ "version": "0.0.102",
4
4
  "description": "A library to support building templates for dosgato CMS.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -14,7 +14,7 @@
14
14
  "build": "rm -rf dist && tsc"
15
15
  },
16
16
  "dependencies": {
17
- "txstate-utils": "^1.7.4"
17
+ "txstate-utils": "^1.8.0"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@types/node": "^18.7.11",