@abp/ng.schematics 10.1.1 → 10.2.0-rc.2

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.
@@ -0,0 +1,7 @@
1
+ import 'zone.js';
2
+ import 'zone.js/testing';
3
+ import { getTestBed } from '@angular/core/testing';
4
+ import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing';
5
+
6
+ // Initialize Angular testing environment
7
+ getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowserTesting());
@@ -14,7 +14,7 @@
14
14
  ]
15
15
  },
16
16
  "exclude": [
17
- "src/test.ts",
17
+ "src/test-setup.ts",
18
18
  "**/*.spec.ts"
19
19
  ]
20
20
  }
@@ -3,15 +3,7 @@
3
3
  "extends": "../../tsconfig.json",
4
4
  "compilerOptions": {
5
5
  "outDir": "../../out-tsc/spec",
6
- "types": [
7
- "jasmine"
8
- ]
6
+ "types": ["vitest/globals"]
9
7
  },
10
- "files": [
11
- "src/test.ts"
12
- ],
13
- "include": [
14
- "**/*.spec.ts",
15
- "**/*.d.ts"
16
- ]
8
+ "include": ["**/*.spec.ts", "**/*.d.ts"]
17
9
  }
@@ -0,0 +1,7 @@
1
+ import 'zone.js';
2
+ import 'zone.js/testing';
3
+ import { getTestBed } from '@angular/core/testing';
4
+ import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing';
5
+
6
+ // Initialize Angular testing environment
7
+ getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowserTesting());
@@ -14,7 +14,7 @@
14
14
  ]
15
15
  },
16
16
  "exclude": [
17
- "src/test.ts",
17
+ "src/test-setup.ts",
18
18
  "**/*.spec.ts"
19
19
  ]
20
20
  }
@@ -3,15 +3,7 @@
3
3
  "extends": "../../tsconfig.json",
4
4
  "compilerOptions": {
5
5
  "outDir": "../../out-tsc/spec",
6
- "types": [
7
- "jasmine"
8
- ]
6
+ "types": ["vitest/globals"]
9
7
  },
10
- "files": [
11
- "src/test.ts"
12
- ],
13
- "include": [
14
- "**/*.spec.ts",
15
- "**/*.d.ts"
16
- ]
8
+ "include": ["**/*.spec.ts", "**/*.d.ts"]
17
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abp/ng.schematics",
3
- "version": "10.1.1",
3
+ "version": "10.2.0-rc.2",
4
4
  "author": "",
5
5
  "schematics": "./collection.json",
6
6
  "dependencies": {
@@ -33,7 +33,8 @@ export declare enum Builders {
33
33
  ExtractI18n = "@angular-devkit/build-angular:extract-i18n",
34
34
  BuildExtractI18n = "@angular/build:extract-i18n",
35
35
  Protractor = "@angular-devkit/build-angular:private-protractor",
36
- BuildApplication = "@angular/build:application"
36
+ BuildApplication = "@angular/build:application",
37
+ UnitTest = "@angular/build:unit-test"
37
38
  }
38
39
  export interface FileReplacements {
39
40
  replace: string;
@@ -39,5 +39,6 @@ var Builders;
39
39
  Builders["BuildExtractI18n"] = "@angular/build:extract-i18n";
40
40
  Builders["Protractor"] = "@angular-devkit/build-angular:private-protractor";
41
41
  Builders["BuildApplication"] = "@angular/build:application";
42
+ Builders["UnitTest"] = "@angular/build:unit-test";
42
43
  })(Builders = exports.Builders || (exports.Builders = {}));
43
44
  //# sourceMappingURL=workspace-models.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-models.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular/workspace-models.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,0CAA2B,CAAA;IAC3B,kCAAmB,CAAA;AACrB,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB;AAED;;;;;GAKG;AACH,IAAY,QAmBX;AAnBD,WAAY,QAAQ;IAClB,qEAAyD,CAAA;IACzD,gEAAoD,CAAA;IACpD,2DAA+C,CAAA;IAC/C,6DAAiD,CAAA;IACjD,yEAA6D,CAAA;IAC7D,iEAAqD,CAAA;IACrD,4EAAgE,CAAA;IAChE,yDAA6C,CAAA;IAC7C,+CAAmC,CAAA;IACnC,2DAA+C,CAAA;IAC/C,kEAAsD,CAAA;IACtD,wDAA4C,CAAA;IAC5C,kEAAsD,CAAA;IACtD,wDAA4C,CAAA;IAC5C,sEAA0D,CAAA;IAC1D,4DAAgD,CAAA;IAChD,2EAA+D,CAAA;IAC/D,2DAA+C,CAAA;AACjD,CAAC,EAnBW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAmBnB"}
1
+ {"version":3,"file":"workspace-models.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular/workspace-models.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,0CAA2B,CAAA;IAC3B,kCAAmB,CAAA;AACrB,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB;AAED;;;;;GAKG;AACH,IAAY,QAoBX;AApBD,WAAY,QAAQ;IAClB,qEAAyD,CAAA;IACzD,gEAAoD,CAAA;IACpD,2DAA+C,CAAA;IAC/C,6DAAiD,CAAA;IACjD,yEAA6D,CAAA;IAC7D,iEAAqD,CAAA;IACrD,4EAAgE,CAAA;IAChE,yDAA6C,CAAA;IAC7C,+CAAmC,CAAA;IACnC,2DAA+C,CAAA;IAC/C,kEAAsD,CAAA;IACtD,wDAA4C,CAAA;IAC5C,kEAAsD,CAAA;IACtD,wDAA4C,CAAA;IAC5C,sEAA0D,CAAA;IAC1D,4DAAgD,CAAA;IAChD,2EAA+D,CAAA;IAC/D,2DAA+C,CAAA;IAC/C,iDAAqC,CAAA;AACvC,CAAC,EApBW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAoBnB"}
@@ -39,11 +39,11 @@ function addLibToWorkspaceFile(projectRoot, projectName) {
39
39
  },
40
40
  },
41
41
  test: {
42
- builder: angular_1.Builders.Karma,
42
+ builder: angular_1.Builders.UnitTest,
43
43
  options: {
44
- main: `${projectRoot}/src/test.ts`,
45
44
  tsConfig: `${projectRoot}/tsconfig.spec.json`,
46
- karmaConfig: `${projectRoot}/karma.conf.js`,
45
+ buildTarget: `${projectName}:build`,
46
+ runner: 'vitest',
47
47
  },
48
48
  },
49
49
  },
@@ -1 +1 @@
1
- {"version":3,"file":"generate-lib.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular-schematic/generate-lib.ts"],"names":[],"mappings":";;;AACA,wCAA8E;AAE9E,SAAgB,cAAc,CAAC,WAAmB,EAAE,GAAG,KAAe;IACpE,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE;YACjC,OAAO,IAAI,CAAC;SACb;QAED,MAAM,IAAI,GAAG,IAAI,kBAAQ,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QACjD,MAAM,QAAQ,GAAG,CAAC,iBAAiB,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QAC3D,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACjC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC7E,CAAC,CAAC;AACJ,CAAC;AAXD,wCAWC;AAED,SAAgB,qBAAqB,CAAC,WAAmB,EAAE,WAAmB;IAC5E,OAAO,IAAA,yBAAe,EAAC,SAAS,CAAC,EAAE;QACjC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC;YACrB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,WAAW;YACjB,UAAU,EAAE,GAAG,WAAW,MAAM;YAChC,WAAW,EAAE,qBAAW,CAAC,OAAO;YAChC,MAAM,EAAE,KAAK;YACb,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,OAAO,EAAE,kBAAQ,CAAC,SAAS;oBAC3B,oBAAoB,EAAE,YAAY;oBAClC,OAAO,EAAE;wBACP,OAAO,EAAE,GAAG,WAAW,kBAAkB;qBAC1C;oBACD,cAAc,EAAE;wBACd,UAAU,EAAE;4BACV,QAAQ,EAAE,GAAG,WAAW,yBAAyB;yBAClD;wBACD,WAAW,EAAE;4BACX,QAAQ,EAAE,GAAG,WAAW,oBAAoB;yBAC7C;qBACF;iBACF;gBACD,IAAI,EAAE;oBACJ,OAAO,EAAE,kBAAQ,CAAC,KAAK;oBACvB,OAAO,EAAE;wBACP,IAAI,EAAE,GAAG,WAAW,cAAc;wBAClC,QAAQ,EAAE,GAAG,WAAW,qBAAqB;wBAC7C,WAAW,EAAE,GAAG,WAAW,gBAAgB;qBAC5C;iBACF;aACF;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAnCD,sDAmCC"}
1
+ {"version":3,"file":"generate-lib.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular-schematic/generate-lib.ts"],"names":[],"mappings":";;;AACA,wCAA8E;AAE9E,SAAgB,cAAc,CAAC,WAAmB,EAAE,GAAG,KAAe;IACpE,OAAO,CAAC,IAAU,EAAE,EAAE;QACpB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE;YACjC,OAAO,IAAI,CAAC;SACb;QAED,MAAM,IAAI,GAAG,IAAI,kBAAQ,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QACjD,MAAM,QAAQ,GAAG,CAAC,iBAAiB,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QAC3D,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACjC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC7E,CAAC,CAAC;AACJ,CAAC;AAXD,wCAWC;AAED,SAAgB,qBAAqB,CAAC,WAAmB,EAAE,WAAmB;IAC5E,OAAO,IAAA,yBAAe,EAAC,SAAS,CAAC,EAAE;QACjC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC;YACrB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,WAAW;YACjB,UAAU,EAAE,GAAG,WAAW,MAAM;YAChC,WAAW,EAAE,qBAAW,CAAC,OAAO;YAChC,MAAM,EAAE,KAAK;YACb,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,OAAO,EAAE,kBAAQ,CAAC,SAAS;oBAC3B,oBAAoB,EAAE,YAAY;oBAClC,OAAO,EAAE;wBACP,OAAO,EAAE,GAAG,WAAW,kBAAkB;qBAC1C;oBACD,cAAc,EAAE;wBACd,UAAU,EAAE;4BACV,QAAQ,EAAE,GAAG,WAAW,yBAAyB;yBAClD;wBACD,WAAW,EAAE;4BACX,QAAQ,EAAE,GAAG,WAAW,oBAAoB;yBAC7C;qBACF;iBACF;gBACD,IAAI,EAAE;oBACJ,OAAO,EAAE,kBAAQ,CAAC,QAAQ;oBAC1B,OAAO,EAAE;wBACP,QAAQ,EAAE,GAAG,WAAW,qBAAqB;wBAC7C,WAAW,EAAE,GAAG,WAAW,QAAQ;wBACnC,MAAM,EAAE,QAAQ;qBACjB;iBACF;aACF;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAnCD,sDAmCC"}
@@ -1,44 +0,0 @@
1
- // Karma configuration file, see link for more information
2
- // https://karma-runner.github.io/1.0/config/configuration-file.html
3
-
4
- module.exports = function (config) {
5
- config.set({
6
- basePath: '',
7
- frameworks: ['jasmine', '@angular-devkit/build-angular'],
8
- plugins: [
9
- require('karma-jasmine'),
10
- require('karma-chrome-launcher'),
11
- require('karma-jasmine-html-reporter'),
12
- require('karma-coverage'),
13
- require('@angular-devkit/build-angular/plugins/karma')
14
- ],
15
- client: {
16
- jasmine: {
17
- // you can add configuration options for Jasmine here
18
- // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19
- // for example, you can disable the random execution with `random: false`
20
- // or set a specific seed with `seed: 4321`
21
- },
22
- clearContext: false // leave Jasmine Spec Runner output visible in browser
23
- },
24
- jasmineHtmlReporter: {
25
- suppressAll: true // removes the duplicated traces
26
- },
27
- coverageReporter: {
28
- dir: require('path').join(__dirname, '../../coverage/<%= kebab(libraryName) %>'),
29
- subdir: '.',
30
- reporters: [
31
- { type: 'html' },
32
- { type: 'text-summary' }
33
- ]
34
- },
35
- reporters: ['progress', 'kjhtml'],
36
- port: 9876,
37
- colors: true,
38
- logLevel: config.LOG_INFO,
39
- autoWatch: true,
40
- browsers: ['Chrome'],
41
- singleRun: false,
42
- restartOnFileChange: true
43
- });
44
- };
@@ -1,26 +0,0 @@
1
- // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2
-
3
- import 'zone.js';
4
- import 'zone.js/testing';
5
- import { getTestBed } from '@angular/core/testing';
6
- import {
7
- BrowserDynamicTestingModule,
8
- platformBrowserDynamicTesting
9
- } from '@angular/platform-browser-dynamic/testing';
10
-
11
- declare const require: {
12
- context(path: string, deep?: boolean, filter?: RegExp): {
13
- keys(): string[];
14
- <T>(id: string): T;
15
- };
16
- };
17
-
18
- // First, initialize the Angular testing environment.
19
- getTestBed().initTestEnvironment(
20
- BrowserDynamicTestingModule,
21
- platformBrowserDynamicTesting()
22
- );
23
- // Then we find all the tests.
24
- const context = require.context('./', true, /\.spec\.ts$/);
25
- // And load the modules.
26
- context.keys().map(context);
@@ -1,44 +0,0 @@
1
- // Karma configuration file, see link for more information
2
- // https://karma-runner.github.io/1.0/config/configuration-file.html
3
-
4
- module.exports = function (config) {
5
- config.set({
6
- basePath: '',
7
- frameworks: ['jasmine', '@angular-devkit/build-angular'],
8
- plugins: [
9
- require('karma-jasmine'),
10
- require('karma-chrome-launcher'),
11
- require('karma-jasmine-html-reporter'),
12
- require('karma-coverage'),
13
- require('@angular-devkit/build-angular/plugins/karma')
14
- ],
15
- client: {
16
- jasmine: {
17
- // you can add configuration options for Jasmine here
18
- // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19
- // for example, you can disable the random execution with `random: false`
20
- // or set a specific seed with `seed: 4321`
21
- },
22
- clearContext: false // leave Jasmine Spec Runner output visible in browser
23
- },
24
- jasmineHtmlReporter: {
25
- suppressAll: true // removes the duplicated traces
26
- },
27
- coverageReporter: {
28
- dir: require('path').join(__dirname, '../../coverage/<%= kebab(libraryName) %>'),
29
- subdir: '.',
30
- reporters: [
31
- { type: 'html' },
32
- { type: 'text-summary' }
33
- ]
34
- },
35
- reporters: ['progress', 'kjhtml'],
36
- port: 9876,
37
- colors: true,
38
- logLevel: config.LOG_INFO,
39
- autoWatch: true,
40
- browsers: ['Chrome'],
41
- singleRun: false,
42
- restartOnFileChange: true
43
- });
44
- };
@@ -1,26 +0,0 @@
1
- // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2
-
3
- import 'zone.js';
4
- import 'zone.js/testing';
5
- import { getTestBed } from '@angular/core/testing';
6
- import {
7
- BrowserDynamicTestingModule,
8
- platformBrowserDynamicTesting
9
- } from '@angular/platform-browser-dynamic/testing';
10
-
11
- declare const require: {
12
- context(path: string, deep?: boolean, filter?: RegExp): {
13
- keys(): string[];
14
- <T>(id: string): T;
15
- };
16
- };
17
-
18
- // First, initialize the Angular testing environment.
19
- getTestBed().initTestEnvironment(
20
- BrowserDynamicTestingModule,
21
- platformBrowserDynamicTesting()
22
- );
23
- // Then we find all the tests.
24
- const context = require.context('./', true, /\.spec\.ts$/);
25
- // And load the modules.
26
- context.keys().map(context);