@travetto/scaffold 5.0.8 → 5.0.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/scaffold",
3
- "version": "5.0.8",
3
+ "version": "5.0.9",
4
4
  "description": "App Scaffold for the Travetto framework",
5
5
  "keywords": [
6
6
  "generator",
@@ -12,8 +12,7 @@
12
12
  "resources/application.yml": {},
13
13
  "src/model/todo.ts": {
14
14
  "requires": [
15
- "@travetto/model",
16
- "@travetto/model-memory"
15
+ "@travetto/model"
17
16
  ]
18
17
  },
19
18
  "src/rest/todo.ts": {
@@ -31,6 +30,7 @@
31
30
  "src/rest/auth.config.ts": {
32
31
  "requires": [
33
32
  "@travetto/rest",
33
+ "@travetto/model-memory",
34
34
  "@travetto/auth-rest"
35
35
  ]
36
36
  },
@@ -154,14 +154,17 @@ export class Context {
154
154
 
155
155
  async resolveFeature(feat: Feature): Promise<void> {
156
156
  if (feat.package) {
157
- if (feat.package.startsWith('@travetto')) {
158
- if (DEV_DEPS.has(feat.package)) {
159
- this.#devDependencies.push(feat.package);
157
+ const pkgs = Array.isArray(feat.package) ? feat.package : [feat.package];
158
+ for (const pkg of pkgs) {
159
+ if (pkg.startsWith('@travetto')) {
160
+ if (DEV_DEPS.has(pkg)) {
161
+ this.#devDependencies.push(pkg);
162
+ } else {
163
+ this.#dependencies.push(pkg);
164
+ }
160
165
  } else {
161
- this.#dependencies.push(feat.package);
166
+ this.#peerDependencies.push(pkg);
162
167
  }
163
- } else {
164
- this.#peerDependencies.push(feat.package);
165
168
  }
166
169
  }
167
170
  if (feat.field) {
@@ -1,6 +1,6 @@
1
1
  export type Feature = {
2
2
  title?: string;
3
- package?: string;
3
+ package?: string | string[];
4
4
  field?: string;
5
5
  value?: string;
6
6
  required?: boolean;
@@ -45,8 +45,8 @@ export const FEATURES: Feature[] = [
45
45
  title: 'Rest Authentication',
46
46
  package: '@travetto/auth-rest',
47
47
  addons: [
48
- { title: 'Rest Session', package: '@travetto/rest-session' },
49
- { title: 'Auth Rest Session', package: '@travetto/auth-rest-session' },
48
+ { title: 'Rest Session', package: ['@travetto/rest-session', '@travetto/model-memory'] },
49
+ { title: 'Auth Rest Session', package: ['@travetto/auth-rest-session', '@travetto/model-memory'] },
50
50
  ]
51
51
  },
52
52
  {