@sprucelabs/spruce-view-plugin 47.0.614 → 47.0.616

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.
@@ -15,7 +15,6 @@ class ViewFeature {
15
15
  this.bootHandler = cb;
16
16
  }
17
17
  async execute() {
18
- var _a;
19
18
  this.exporter = heartwood_view_controllers_1.ViewControllerExporter.Exporter(this.skill.rootDir);
20
19
  this.viewsSource = spruce_test_fixtures_1.vcDiskUtil.resolveCombinedViewsPath(spruce_skill_utils_1.diskUtil.resolvePath(this.skill.rootDir, 'src'));
21
20
  if (process.env.SHOULD_REGISTER_VIEWS !== 'false') {
@@ -24,7 +23,7 @@ class ViewFeature {
24
23
  else if (process.env.VIEW_PROFILER_STATS_DESTINATION_DIR) {
25
24
  await this.export();
26
25
  }
27
- await ((_a = this.bootHandler) === null || _a === void 0 ? void 0 : _a.call(this));
26
+ await this.bootHandler?.();
28
27
  this._isBooted = true;
29
28
  if (this.isWatching) {
30
29
  this.log.info('Watching for view changes...');
@@ -56,21 +55,19 @@ class ViewFeature {
56
55
  }
57
56
  }
58
57
  async export() {
59
- var _a;
60
58
  if (!this.viewsSource) {
61
59
  return;
62
60
  }
63
61
  const destination = spruce_skill_utils_1.diskUtil.resolvePath(spruce_skill_utils_1.diskUtil.createRandomTempDir(), 'bundle.js');
64
62
  this.exportDestination = destination;
65
- await ((_a = this.exporter) === null || _a === void 0 ? void 0 : _a.export({
63
+ await this.exporter?.export({
66
64
  source: this.viewsSource,
67
65
  destination,
68
66
  profilerStatsDestination: process.env.VIEW_PROFILER_STATS_DESTINATION_DIR,
69
67
  shouldWatch: this.isWatching,
70
68
  onDidIncrementallyBuild: (err) => {
71
- var _a;
72
69
  if (err) {
73
- this.log.error('Incremental build error', (_a = err.stack) !== null && _a !== void 0 ? _a : err.message);
70
+ this.log.error('Incremental build error', err.stack ?? err.message);
74
71
  }
75
72
  else {
76
73
  this.log.info('Incremental build complete!');
@@ -80,7 +77,7 @@ class ViewFeature {
80
77
  onWillIncrementallyBuild: () => {
81
78
  this.log.info('Changes detected... Building differences.');
82
79
  },
83
- }));
80
+ });
84
81
  this.log.info('Bundling local views.');
85
82
  }
86
83
  async checkHealth() {
@@ -16,7 +16,7 @@ class AbstractViewPluginTest extends spruce_test_fixtures_1.AbstractSpruceFixtur
16
16
  await super.beforeEach();
17
17
  }
18
18
  static Skill(options) {
19
- const { plugins = [spruce_event_plugin_1.plugin, view_plugin_1.default] } = options !== null && options !== void 0 ? options : {};
19
+ const { plugins = [spruce_event_plugin_1.plugin, view_plugin_1.default] } = options ?? {};
20
20
  return super.Skill({
21
21
  plugins,
22
22
  ...options,
@@ -2,9 +2,8 @@
2
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
- var _a;
6
5
  Object.defineProperty(exports, "__esModule", { value: true });
7
6
  exports.DEMO_NUMBER = void 0;
8
7
  const dotenv_1 = __importDefault(require("dotenv"));
9
8
  dotenv_1.default.config();
10
- exports.DEMO_NUMBER = (_a = process.env.DEMO_NUMBER) !== null && _a !== void 0 ? _a : '**missing**';
9
+ exports.DEMO_NUMBER = process.env.DEMO_NUMBER ?? '**missing**';
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "@types/node"
17
17
  ]
18
18
  },
19
- "version": "47.0.614",
19
+ "version": "47.0.616",
20
20
  "files": [
21
21
  "build/**/*",
22
22
  "!build/__tests__",
@@ -65,26 +65,26 @@
65
65
  "update.dependencies": "yarn run clean.dependencies && yarn"
66
66
  },
67
67
  "dependencies": {
68
- "@sprucelabs/error": "^6.0.476",
69
- "@sprucelabs/globby": "^2.0.437",
70
- "@sprucelabs/heartwood-view-controllers": "^110.12.153",
71
- "@sprucelabs/schema": "^30.0.485",
72
- "@sprucelabs/spruce-core-schemas": "^40.1.471",
73
- "@sprucelabs/spruce-event-plugin": "^62.3.43",
74
- "@sprucelabs/spruce-event-utils": "^40.1.247",
75
- "@sprucelabs/spruce-skill-booter": "^62.3.43",
76
- "@sprucelabs/spruce-skill-utils": "^31.0.544",
77
- "@sprucelabs/spruce-test-fixtures": "^62.3.43"
68
+ "@sprucelabs/error": "^6.0.480",
69
+ "@sprucelabs/globby": "^2.0.441",
70
+ "@sprucelabs/heartwood-view-controllers": "^110.12.160",
71
+ "@sprucelabs/schema": "^30.0.489",
72
+ "@sprucelabs/spruce-core-schemas": "^40.1.474",
73
+ "@sprucelabs/spruce-event-plugin": "^62.3.44",
74
+ "@sprucelabs/spruce-event-utils": "^40.1.249",
75
+ "@sprucelabs/spruce-skill-booter": "^62.3.44",
76
+ "@sprucelabs/spruce-skill-utils": "^31.0.547",
77
+ "@sprucelabs/spruce-test-fixtures": "^62.3.44"
78
78
  },
79
79
  "devDependencies": {
80
- "@sprucelabs/esm-postbuild": "^6.0.460",
81
- "@sprucelabs/jest-json-reporter": "^8.0.476",
82
- "@sprucelabs/mercury-client": "^42.0.526",
83
- "@sprucelabs/mercury-types": "^47.0.527",
84
- "@sprucelabs/resolve-path-aliases": "^2.0.455",
80
+ "@sprucelabs/esm-postbuild": "^6.0.462",
81
+ "@sprucelabs/jest-json-reporter": "^8.0.480",
82
+ "@sprucelabs/mercury-client": "^42.0.528",
83
+ "@sprucelabs/mercury-types": "^47.0.529",
84
+ "@sprucelabs/resolve-path-aliases": "^2.0.457",
85
85
  "@sprucelabs/semantic-release": "^5.0.2",
86
- "@sprucelabs/test": "^9.0.50",
87
- "@sprucelabs/test-utils": "^5.1.426",
86
+ "@sprucelabs/test": "^9.0.51",
87
+ "@sprucelabs/test-utils": "^5.1.433",
88
88
  "@types/inquirer": "^9.0.7",
89
89
  "@types/node": "17.0.5",
90
90
  "chokidar-cli": "^3.0.0",
package/tsconfig.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "skipLibCheck": true,
4
4
  "module": "commonjs",
5
5
  "esModuleInterop": true,
6
- "target": "ES2019",
6
+ "target": "ES2020",
7
7
  "lib": [
8
8
  "DOM",
9
9
  "ES2022"