@lwrjs/nunjucks-view-provider 0.9.0-alpha.9 → 0.9.0

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.
@@ -41,10 +41,11 @@ var NunJucksViewProvider = class {
41
41
  this.name = "lwr-nunjucks-view-provider";
42
42
  this.emitter = providerConfig.appEmitter;
43
43
  const {
44
- runtimeEnvironment: {watchFiles}
44
+ runtimeEnvironment: {watchFiles},
45
+ watcherFactory
45
46
  } = providerConfig;
46
- if (watchFiles) {
47
- this.watcher = (0, import_shared_utils.setupWatcher)(this.onViewChange.bind(this));
47
+ if (watchFiles && watcherFactory) {
48
+ this.watcher = watcherFactory.setupWatcher(this.onViewChange.bind(this));
48
49
  }
49
50
  }
50
51
  async onViewChange(fileChanged) {
package/build/es/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import path from 'path';
2
2
  import nunjucks from 'nunjucks';
3
3
  import grayMatter from 'gray-matter';
4
- import { getViewSourceFromFile, canResolveView, setupWatcher } from '@lwrjs/shared-utils';
4
+ import { getViewSourceFromFile, canResolveView } from '@lwrjs/shared-utils';
5
5
  import { NunjucksCustomLoader, addHelperMethods } from './nunjucks-env-utils.js';
6
6
  export default class NunJucksViewProvider {
7
7
  constructor(pluginConfig, providerConfig) {
@@ -13,9 +13,9 @@ export default class NunJucksViewProvider {
13
13
  this.name = 'lwr-nunjucks-view-provider';
14
14
  this.emitter = providerConfig.appEmitter;
15
15
  // Setup watcher
16
- const { runtimeEnvironment: { watchFiles }, } = providerConfig;
17
- if (watchFiles) {
18
- this.watcher = setupWatcher(this.onViewChange.bind(this));
16
+ const { runtimeEnvironment: { watchFiles }, watcherFactory, } = providerConfig;
17
+ if (watchFiles && watcherFactory) {
18
+ this.watcher = watcherFactory.setupWatcher(this.onViewChange.bind(this));
19
19
  }
20
20
  }
21
21
  async onViewChange(fileChanged) {
package/package.json CHANGED
@@ -4,15 +4,15 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.9.0-alpha.9",
7
+ "version": "0.9.0",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "https://github.com/salesforce/lwr.git",
11
+ "url": "https://github.com/salesforce-experience-platform-emu/lwr.git",
12
12
  "directory": "packages/@lwrjs/nunjucks-view-provider"
13
13
  },
14
14
  "bugs": {
15
- "url": "https://github.com/salesforce/lwr/issues"
15
+ "url": "https://github.com/salesforce-experience-platform-emu/lwr/issues"
16
16
  },
17
17
  "type": "module",
18
18
  "types": "build/es/index.d.ts",
@@ -30,17 +30,16 @@
30
30
  "build/**/*.d.ts"
31
31
  ],
32
32
  "dependencies": {
33
- "@lwrjs/base-template-engine": "0.9.0-alpha.9",
34
- "@lwrjs/shared-utils": "0.9.0-alpha.9",
33
+ "@lwrjs/shared-utils": "0.9.0",
35
34
  "gray-matter": "^4.0.2",
36
35
  "nunjucks": "^3.2.2",
37
36
  "parse5-sax-parser": "^6.0.1"
38
37
  },
39
38
  "devDependencies": {
40
- "@lwrjs/types": "0.9.0-alpha.9"
39
+ "@lwrjs/types": "0.9.0"
41
40
  },
42
41
  "engines": {
43
- "node": ">=14.15.4 <19"
42
+ "node": ">=16.0.0 <20"
44
43
  },
45
- "gitHead": "93522592d25375bb20da156f864d153ffcd3ec88"
44
+ "gitHead": "4e42b0dc5453f92b36b42aa8132c5bc281e616b7"
46
45
  }