@o3r/schematics 8.2.0-alpha.48 → 8.2.0-alpha.49

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/schematics",
3
- "version": "8.2.0-alpha.48",
3
+ "version": "8.2.0-alpha.49",
4
4
  "description": "Schematics module of the Otter framework",
5
5
  "main": "./src/index.js",
6
6
  "keywords": [
@@ -28,7 +28,7 @@
28
28
  }
29
29
  },
30
30
  "dependencies": {
31
- "@o3r/dev-tools": "^8.2.0-alpha.48",
31
+ "@o3r/dev-tools": "^8.2.0-alpha.49",
32
32
  "comment-json": "^4.1.0",
33
33
  "globby": "^11.1.0",
34
34
  "minimatch": "^6.1.6",
@@ -51,8 +51,8 @@
51
51
  "@nrwl/jest": "~15.9.0",
52
52
  "@nrwl/js": "~15.9.0",
53
53
  "@nrwl/linter": "~15.9.0",
54
- "@o3r/build-helpers": "^8.2.0-alpha.48",
55
- "@o3r/eslint-plugin": "^8.2.0-alpha.48",
54
+ "@o3r/build-helpers": "^8.2.0-alpha.49",
55
+ "@o3r/eslint-plugin": "^8.2.0-alpha.49",
56
56
  "@schematics/angular": "~15.2.0",
57
57
  "@types/jest": "~28.1.2",
58
58
  "@types/node": "^17.0.45",
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACH,SAAgB,KAAK;IACnB,kBAAkB;IAClB,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;AAClB,CAAC;AAHD,sBAGC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":""}
@@ -4,4 +4,5 @@ export * from './check-packages-peers/index';
4
4
  export * from './ng-add/index';
5
5
  export * from './remove-packages/index';
6
6
  export * from './update-imports/index';
7
+ export * from './vscode-extensions/index';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rule-factories/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rule-factories/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC"}
@@ -7,4 +7,5 @@ tslib_1.__exportStar(require("./check-packages-peers/index"), exports);
7
7
  tslib_1.__exportStar(require("./ng-add/index"), exports);
8
8
  tslib_1.__exportStar(require("./remove-packages/index"), exports);
9
9
  tslib_1.__exportStar(require("./update-imports/index"), exports);
10
+ tslib_1.__exportStar(require("./vscode-extensions/index"), exports);
10
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rule-factories/index.ts"],"names":[],"mappings":";;;AAAA,6DAAmC;AACnC,uDAA6B;AAC7B,uEAA6C;AAC7C,yDAA+B;AAC/B,kEAAwC;AACxC,iEAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rule-factories/index.ts"],"names":[],"mappings":";;;AAAA,6DAAmC;AACnC,uDAA6B;AAC7B,uEAA6C;AAC7C,yDAA+B;AAC/B,kEAAwC;AACxC,iEAAuC;AACvC,oEAA0C"}
@@ -0,0 +1,8 @@
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ /**
3
+ * Update VsCode recommendations for the current project
4
+ *
5
+ * @param recommendations list of recommendations
6
+ */
7
+ export declare const addVsCodeRecommendations: (recommendations: string[]) => Rule;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/vscode-extensions/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAE/E;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,oBAAqB,MAAM,EAAE,KAAG,IAepE,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addVsCodeRecommendations = void 0;
4
+ /**
5
+ * Update VsCode recommendations for the current project
6
+ *
7
+ * @param recommendations list of recommendations
8
+ */
9
+ const addVsCodeRecommendations = (recommendations) => {
10
+ const extensionFile = '/.vscode/extensions.json';
11
+ return (tree, context) => {
12
+ if (!tree.exists(extensionFile)) {
13
+ tree.create(extensionFile, JSON.stringify({ recommendations }, null, 2));
14
+ context.logger.debug(`Create ${extensionFile} with recommendations: ${recommendations.join(', ')}`);
15
+ }
16
+ else {
17
+ const extensions = tree.readJson(extensionFile);
18
+ extensions.recommendations = Array.from(new Set([...(extensions.recommendations || []), ...recommendations]));
19
+ tree.overwrite(extensionFile, JSON.stringify(extensions, null, 2));
20
+ context.logger.debug(`Updated ${extensionFile} with recommendations: ${recommendations.join(', ')}`);
21
+ }
22
+ return tree;
23
+ };
24
+ };
25
+ exports.addVsCodeRecommendations = addVsCodeRecommendations;
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rule-factories/vscode-extensions/index.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACI,MAAM,wBAAwB,GAAG,CAAC,eAAyB,EAAQ,EAAE;IAC1E,MAAM,aAAa,GAAG,0BAA0B,CAAC;IAEjD,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC/C,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE;YAC/B,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YACzE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,aAAa,0BAA0B,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SACrG;aAAM;YACL,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAkC,CAAC;YACjF,UAAU,CAAC,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,eAAe,IAAI,EAAE,CAAC,EAAE,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;YAC9G,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YACnE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,aAAa,0BAA0B,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SACtG;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,wBAAwB,4BAenC"}