@travetto/scaffold 2.0.2 → 2.1.1

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,5 @@
1
1
  import * as path from 'path';
2
- import * as fs from 'fs';
2
+ import * as fs from 'fs/promises';
3
3
  import * as mustache from 'mustache';
4
4
 
5
5
  import { EnvUtil, ExecUtil, FsUtil, PathUtil } from '@travetto/boot';
@@ -97,11 +97,11 @@ export class Context {
97
97
  }
98
98
 
99
99
  async template(file: string, { rename }: ListingEntry) {
100
- const contents = await fs.promises.readFile(this.source(file), 'utf-8');
100
+ const contents = await fs.readFile(this.source(file), 'utf-8');
101
101
  const out = this.destination(rename ?? file);
102
102
  const rendered = mustache.render(contents, this).replace(/^\s*(\/\/|#)\s*\n/gsm, '');
103
- await fs.promises.mkdir(path.dirname(out), { recursive: true });
104
- await fs.promises.writeFile(out, rendered, 'utf8');
103
+ await fs.mkdir(path.dirname(out), { recursive: true });
104
+ await fs.writeFile(out, rendered, 'utf8');
105
105
  }
106
106
 
107
107
  async templateResolvedFiles() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@travetto/scaffold",
3
3
  "displayName": "App Scaffold",
4
- "version": "2.0.2",
4
+ "version": "2.1.1",
5
5
  "description": "App Scaffold for the Travetto framework",
6
6
  "keywords": [
7
7
  "generator",
@@ -32,13 +32,13 @@
32
32
  "trv-scaffold": "./bin/trv-scaffold.js"
33
33
  },
34
34
  "dependencies": {
35
- "@travetto/boot": "^2.0.2",
36
- "@travetto/cli": "^2.0.2",
35
+ "@travetto/boot": "^2.1.1",
36
+ "@travetto/cli": "^2.1.1",
37
37
  "mustache": "^4.2.0",
38
38
  "enquirer": "^2.3.6"
39
39
  },
40
40
  "devDependencies": {
41
- "@types/mustache": "^4.1.1"
41
+ "@types/mustache": "^4.1.2"
42
42
  },
43
43
  "docDependencies": {
44
44
  "@travetto/auth-rest": true,
@@ -36,7 +36,14 @@
36
36
  "indent": "off",
37
37
  "@typescript-eslint/indent": [
38
38
  "error",
39
- 2
39
+ 2,
40
+ {
41
+ "ignoredNodes": [
42
+ "FunctionExpression > .params[decorators.length > 0]",
43
+ "FunctionExpression > .params > :matches(Decorator, :not(:first-child))",
44
+ "ClassBody.body > PropertyDefinition[decorators.length > 0] > .key"
45
+ ]
46
+ }
40
47
  ],
41
48
  "@typescript-eslint/member-delimiter-style": [
42
49
  "error",