@schematics/angular 21.0.0-next.0 → 21.0.0-next.10
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/ai-config/index.js +33 -13
- package/ai-config/index.js.map +1 -0
- package/ai-config/schema.d.ts +1 -0
- package/ai-config/schema.js +2 -0
- package/ai-config/schema.js.map +1 -0
- package/ai-config/schema.json +12 -24
- package/app-shell/index.d.ts +2 -1
- package/app-shell/index.js +17 -24
- package/app-shell/index.js.map +1 -0
- package/app-shell/schema.js +1 -0
- package/app-shell/schema.js.map +1 -0
- package/application/files/common-files/tsconfig.spec.json.template +1 -1
- package/application/files/module-files/src/app/app-module.ts.template +2 -3
- package/application/files/module-files/src/app/{app.spec.ts.template → app__suffix__.spec.ts.template} +4 -6
- package/application/files/standalone-files/src/app/app.config.ts.template +3 -3
- package/application/files/standalone-files/src/app/{app.spec.ts.template → app__suffix__.spec.ts.template} +4 -6
- package/application/files/standalone-files/src/app/{app.ts.template → app__suffix__.ts.template} +2 -2
- package/application/index.js +91 -14
- package/application/index.js.map +1 -0
- package/application/schema.d.ts +30 -1
- package/application/schema.js +22 -1
- package/application/schema.js.map +1 -0
- package/application/schema.json +19 -4
- package/class/index.js +1 -0
- package/class/index.js.map +1 -0
- package/class/schema.js +1 -0
- package/class/schema.js.map +1 -0
- package/collection.json +13 -0
- package/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template +7 -7
- package/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template +7 -7
- package/component/index.d.ts +2 -1
- package/component/index.js +53 -53
- package/component/index.js.map +1 -0
- package/component/schema.d.ts +5 -0
- package/component/schema.js +1 -0
- package/component/schema.js.map +1 -0
- package/component/schema.json +5 -0
- package/config/files/.browserslistrc.template +1 -1
- package/config/index.d.ts +2 -1
- package/config/index.js +12 -20
- package/config/index.js.map +1 -0
- package/config/schema.js +1 -0
- package/config/schema.js.map +1 -0
- package/directive/files/__name@dasherize__.__type@dasherize__.spec.ts.template +3 -3
- package/directive/files/__name@dasherize__.__type@dasherize__.ts.template +3 -3
- package/directive/index.d.ts +2 -1
- package/directive/index.js +26 -27
- package/directive/index.js.map +1 -0
- package/directive/schema.d.ts +5 -0
- package/directive/schema.js +1 -0
- package/directive/schema.js.map +1 -0
- package/directive/schema.json +5 -0
- package/e2e/index.js +1 -0
- package/e2e/index.js.map +1 -0
- package/e2e/schema.js +1 -0
- package/e2e/schema.js.map +1 -0
- package/enum/index.js +1 -0
- package/enum/index.js.map +1 -0
- package/enum/schema.js +1 -0
- package/enum/schema.js.map +1 -0
- package/environments/index.js +1 -0
- package/environments/index.js.map +1 -0
- package/environments/schema.js +1 -0
- package/environments/schema.js.map +1 -0
- package/guard/implements-files/__name@dasherize____typeSeparator__guard.ts.template +1 -1
- package/guard/index.js +1 -0
- package/guard/index.js.map +1 -0
- package/guard/schema.js +1 -0
- package/guard/schema.js.map +1 -0
- package/interceptor/index.js +1 -0
- package/interceptor/index.js.map +1 -0
- package/interceptor/schema.js +1 -0
- package/interceptor/schema.js.map +1 -0
- package/interface/index.js +1 -0
- package/interface/index.js.map +1 -0
- package/interface/schema.js +1 -0
- package/interface/schema.js.map +1 -0
- package/library/files/tsconfig.spec.json.template +1 -1
- package/library/index.js +18 -8
- package/library/index.js.map +1 -0
- package/library/schema.js +1 -0
- package/library/schema.js.map +1 -0
- package/migrations/karma/karma-config-analyzer.js +1 -0
- package/migrations/karma/karma-config-analyzer.js.map +1 -0
- package/migrations/karma/karma-config-comparer.js +2 -1
- package/migrations/karma/karma-config-comparer.js.map +1 -0
- package/migrations/karma/migration.js +1 -0
- package/migrations/karma/migration.js.map +1 -0
- package/migrations/migration-collection.json +11 -0
- package/migrations/update-module-resolution/migration.d.ts +9 -0
- package/migrations/update-module-resolution/migration.js +53 -0
- package/migrations/update-module-resolution/migration.js.map +1 -0
- package/migrations/update-typescript-lib/migration.d.ts +9 -0
- package/migrations/update-typescript-lib/migration.js +80 -0
- package/migrations/update-typescript-lib/migration.js.map +1 -0
- package/migrations/use-application-builder/css-import-lexer.js +1 -0
- package/migrations/use-application-builder/css-import-lexer.js.map +1 -0
- package/migrations/use-application-builder/migration.js +2 -0
- package/migrations/use-application-builder/migration.js.map +1 -0
- package/migrations/use-application-builder/stylesheet-updates.js +1 -0
- package/migrations/use-application-builder/stylesheet-updates.js.map +1 -0
- package/module/index.d.ts +2 -1
- package/module/index.js +49 -50
- package/module/index.js.map +1 -0
- package/module/schema.js +1 -0
- package/module/schema.js.map +1 -0
- package/ng-new/index.js +10 -0
- package/ng-new/index.js.map +1 -0
- package/ng-new/schema.d.ts +31 -2
- package/ng-new/schema.js +23 -2
- package/ng-new/schema.js.map +1 -0
- package/ng-new/schema.json +15 -3
- package/package.json +4 -4
- package/pipe/files/__name@dasherize____typeSeparator__pipe.ts.template +2 -2
- package/pipe/index.d.ts +2 -2
- package/pipe/index.js +17 -18
- package/pipe/index.js.map +1 -0
- package/pipe/schema.js +1 -0
- package/pipe/schema.js.map +1 -0
- package/refactor/jasmine-vitest/index.d.ts +10 -0
- package/refactor/jasmine-vitest/index.js +103 -0
- package/refactor/jasmine-vitest/index.js.map +1 -0
- package/refactor/jasmine-vitest/schema.d.ts +25 -0
- package/refactor/jasmine-vitest/schema.js +5 -0
- package/refactor/jasmine-vitest/schema.js.map +1 -0
- package/refactor/jasmine-vitest/schema.json +30 -0
- package/refactor/jasmine-vitest/test-file-transformer.d.ts +16 -0
- package/refactor/jasmine-vitest/test-file-transformer.js +141 -0
- package/refactor/jasmine-vitest/test-file-transformer.js.map +1 -0
- package/refactor/jasmine-vitest/transformers/jasmine-lifecycle.d.ts +18 -0
- package/refactor/jasmine-vitest/transformers/jasmine-lifecycle.js +250 -0
- package/refactor/jasmine-vitest/transformers/jasmine-lifecycle.js.map +1 -0
- package/refactor/jasmine-vitest/transformers/jasmine-matcher.d.ts +26 -0
- package/refactor/jasmine-vitest/transformers/jasmine-matcher.js +398 -0
- package/refactor/jasmine-vitest/transformers/jasmine-matcher.js.map +1 -0
- package/refactor/jasmine-vitest/transformers/jasmine-misc.d.ts +21 -0
- package/refactor/jasmine-vitest/transformers/jasmine-misc.js +164 -0
- package/refactor/jasmine-vitest/transformers/jasmine-misc.js.map +1 -0
- package/refactor/jasmine-vitest/transformers/jasmine-spy.d.ts +19 -0
- package/refactor/jasmine-vitest/transformers/jasmine-spy.js +284 -0
- package/refactor/jasmine-vitest/transformers/jasmine-spy.js.map +1 -0
- package/refactor/jasmine-vitest/transformers/jasmine-type.d.ts +16 -0
- package/refactor/jasmine-vitest/transformers/jasmine-type.js +64 -0
- package/refactor/jasmine-vitest/transformers/jasmine-type.js.map +1 -0
- package/refactor/jasmine-vitest/utils/ast-helpers.d.ts +13 -0
- package/refactor/jasmine-vitest/utils/ast-helpers.js +43 -0
- package/refactor/jasmine-vitest/utils/ast-helpers.js.map +1 -0
- package/refactor/jasmine-vitest/utils/ast-validation.d.ts +25 -0
- package/refactor/jasmine-vitest/utils/ast-validation.js +44 -0
- package/refactor/jasmine-vitest/utils/ast-validation.js.map +1 -0
- package/refactor/jasmine-vitest/utils/comment-helpers.d.ts +29 -0
- package/refactor/jasmine-vitest/utils/comment-helpers.js +37 -0
- package/refactor/jasmine-vitest/utils/comment-helpers.js.map +1 -0
- package/refactor/jasmine-vitest/utils/refactor-context.d.ts +28 -0
- package/refactor/jasmine-vitest/utils/refactor-context.js +10 -0
- package/refactor/jasmine-vitest/utils/refactor-context.js.map +1 -0
- package/refactor/jasmine-vitest/utils/refactor-reporter.d.ts +24 -0
- package/refactor/jasmine-vitest/utils/refactor-reporter.js +72 -0
- package/refactor/jasmine-vitest/utils/refactor-reporter.js.map +1 -0
- package/refactor/jasmine-vitest/utils/todo-notes.d.ts +132 -0
- package/refactor/jasmine-vitest/utils/todo-notes.js +108 -0
- package/refactor/jasmine-vitest/utils/todo-notes.js.map +1 -0
- package/resolver/index.js +1 -0
- package/resolver/index.js.map +1 -0
- package/resolver/schema.js +1 -0
- package/resolver/schema.js.map +1 -0
- package/server/files/application-builder/standalone-src/main.server.ts.template +3 -2
- package/server/files/server-builder/standalone-src/main.server.ts.template +3 -2
- package/server/index.d.ts +2 -1
- package/server/index.js +68 -71
- package/server/index.js.map +1 -0
- package/server/schema.js +1 -0
- package/server/schema.js.map +1 -0
- package/service/files/__name@dasherize__.__type@dasherize__.spec.ts.template +4 -4
- package/service/files/__name@dasherize__.__type@dasherize__.ts.template +2 -2
- package/service/index.d.ts +2 -1
- package/service/index.js +21 -4
- package/service/index.js.map +1 -0
- package/service/schema.d.ts +5 -0
- package/service/schema.js +1 -0
- package/service/schema.js.map +1 -0
- package/service/schema.json +5 -0
- package/service-worker/index.d.ts +2 -1
- package/service-worker/index.js +45 -81
- package/service-worker/index.js.map +1 -0
- package/service-worker/schema.js +1 -0
- package/service-worker/schema.js.map +1 -0
- package/ssr/files/application-builder/server.ts.template +2 -2
- package/ssr/files/server-builder/server.ts.template +0 -2
- package/ssr/index.d.ts +2 -1
- package/ssr/index.js +33 -40
- package/ssr/index.js.map +1 -0
- package/ssr/schema.js +1 -0
- package/ssr/schema.js.map +1 -0
- package/ssr/tty.js +1 -0
- package/ssr/tty.js.map +1 -0
- package/tailwind/files/.postcssrc.json.template +5 -0
- package/tailwind/index.d.ts +11 -0
- package/tailwind/index.js +107 -0
- package/tailwind/index.js.map +1 -0
- package/tailwind/schema.d.ts +12 -0
- package/tailwind/schema.js +5 -0
- package/tailwind/schema.js.map +1 -0
- package/tailwind/schema.json +20 -0
- package/utility/add-declaration-to-ng-module.js +1 -0
- package/utility/add-declaration-to-ng-module.js.map +1 -0
- package/utility/ast-utils.js +32 -17
- package/utility/ast-utils.js.map +1 -0
- package/utility/change.js +1 -0
- package/utility/change.js.map +1 -0
- package/utility/dependencies.js +1 -0
- package/utility/dependencies.js.map +1 -0
- package/utility/dependency.js +1 -0
- package/utility/dependency.js.map +1 -0
- package/utility/eol.js +1 -0
- package/utility/eol.js.map +1 -0
- package/utility/find-module.js +1 -0
- package/utility/find-module.js.map +1 -0
- package/utility/generate-from-files.d.ts +1 -0
- package/utility/generate-from-files.js +1 -0
- package/utility/generate-from-files.js.map +1 -0
- package/utility/index.js +1 -0
- package/utility/index.js.map +1 -0
- package/utility/json-file.js +1 -0
- package/utility/json-file.js.map +1 -0
- package/utility/latest-versions/package.json +5 -1
- package/utility/latest-versions.js +4 -3
- package/utility/latest-versions.js.map +1 -0
- package/utility/ng-ast-utils.js +1 -0
- package/utility/ng-ast-utils.js.map +1 -0
- package/utility/parse-name.js +1 -0
- package/utility/parse-name.js.map +1 -0
- package/utility/paths.js +1 -0
- package/utility/paths.js.map +1 -0
- package/utility/project-targets.d.ts +1 -0
- package/utility/project-targets.js +11 -0
- package/utility/project-targets.js.map +1 -0
- package/utility/project.d.ts +25 -0
- package/utility/project.js +31 -0
- package/utility/project.js.map +1 -0
- package/utility/standalone/app_component.js +1 -0
- package/utility/standalone/app_component.js.map +1 -0
- package/utility/standalone/app_config.js +1 -0
- package/utility/standalone/app_config.js.map +1 -0
- package/utility/standalone/code_block.js +1 -0
- package/utility/standalone/code_block.js.map +1 -0
- package/utility/standalone/index.js +1 -0
- package/utility/standalone/index.js.map +1 -0
- package/utility/standalone/rules.js +3 -3
- package/utility/standalone/rules.js.map +1 -0
- package/utility/standalone/util.js +1 -0
- package/utility/standalone/util.js.map +1 -0
- package/utility/validation.js +1 -0
- package/utility/validation.js.map +1 -0
- package/utility/workspace-models.d.ts +1 -0
- package/utility/workspace-models.js +2 -0
- package/utility/workspace-models.js.map +1 -0
- package/utility/workspace.js +1 -0
- package/utility/workspace.js.map +1 -0
- package/web-worker/index.d.ts +2 -1
- package/web-worker/index.js +61 -70
- package/web-worker/index.js.map +1 -0
- package/web-worker/schema.js +1 -0
- package/web-worker/schema.js.map +1 -0
- package/workspace/files/__dot__gitignore.template +1 -0
- package/workspace/files/package.json.template +2 -8
- package/workspace/files/tsconfig.json.template +0 -1
- package/workspace/index.js +35 -9
- package/workspace/index.js.map +1 -0
- package/workspace/schema.d.ts +0 -1
- package/workspace/schema.js +1 -1
- package/workspace/schema.js.map +1 -0
- package/workspace/schema.json +4 -1
- package/config/.browserslistrc +0 -7
- /package/application/files/common-files/src/app/{app.html.template → app__suffix__.html.template} +0 -0
- /package/application/files/module-files/src/app/{app.ts.template → app__suffix__.ts.template} +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
//# sourceMappingURL=refactor-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refactor-context.js","sourceRoot":"","sources":["refactor-context.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import { logging } from '@angular-devkit/core';
|
|
9
|
+
import ts from '../../../third_party/github.com/Microsoft/TypeScript/lib/typescript';
|
|
10
|
+
import { TodoCategory } from './todo-notes';
|
|
11
|
+
export declare class RefactorReporter {
|
|
12
|
+
private logger;
|
|
13
|
+
private filesScanned;
|
|
14
|
+
private filesTransformed;
|
|
15
|
+
private readonly todos;
|
|
16
|
+
private readonly verboseLogs;
|
|
17
|
+
constructor(logger: logging.LoggerApi);
|
|
18
|
+
get hasTodos(): boolean;
|
|
19
|
+
incrementScannedFiles(): void;
|
|
20
|
+
incrementTransformedFiles(): void;
|
|
21
|
+
recordTodo(category: TodoCategory): void;
|
|
22
|
+
reportTransformation(sourceFile: ts.SourceFile, node: ts.Node, message: string): void;
|
|
23
|
+
printSummary(verbose?: boolean): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.RefactorReporter = void 0;
|
|
14
|
+
const typescript_1 = __importDefault(require("../../../third_party/github.com/Microsoft/TypeScript/lib/typescript"));
|
|
15
|
+
class RefactorReporter {
|
|
16
|
+
logger;
|
|
17
|
+
filesScanned = 0;
|
|
18
|
+
filesTransformed = 0;
|
|
19
|
+
todos = new Map();
|
|
20
|
+
verboseLogs = new Map();
|
|
21
|
+
constructor(logger) {
|
|
22
|
+
this.logger = logger;
|
|
23
|
+
}
|
|
24
|
+
get hasTodos() {
|
|
25
|
+
return this.todos.size > 0;
|
|
26
|
+
}
|
|
27
|
+
incrementScannedFiles() {
|
|
28
|
+
this.filesScanned++;
|
|
29
|
+
}
|
|
30
|
+
incrementTransformedFiles() {
|
|
31
|
+
this.filesTransformed++;
|
|
32
|
+
}
|
|
33
|
+
recordTodo(category) {
|
|
34
|
+
this.todos.set(category, (this.todos.get(category) ?? 0) + 1);
|
|
35
|
+
}
|
|
36
|
+
reportTransformation(sourceFile, node, message) {
|
|
37
|
+
const { line } = typescript_1.default.getLineAndCharacterOfPosition(sourceFile, typescript_1.default.getOriginalNode(node).getStart());
|
|
38
|
+
const filePath = sourceFile.fileName;
|
|
39
|
+
let logs = this.verboseLogs.get(filePath);
|
|
40
|
+
if (!logs) {
|
|
41
|
+
logs = [];
|
|
42
|
+
this.verboseLogs.set(filePath, logs);
|
|
43
|
+
}
|
|
44
|
+
logs.push(`L${line + 1}: ${message}`);
|
|
45
|
+
}
|
|
46
|
+
printSummary(verbose = false) {
|
|
47
|
+
if (verbose && this.verboseLogs.size > 0) {
|
|
48
|
+
this.logger.info('Detailed Transformation Log:');
|
|
49
|
+
for (const [filePath, logs] of this.verboseLogs) {
|
|
50
|
+
this.logger.info(`Processing: ${filePath}`);
|
|
51
|
+
logs.forEach((log) => this.logger.info(` - ${log}`));
|
|
52
|
+
}
|
|
53
|
+
this.logger.info(''); // Add a blank line for separation
|
|
54
|
+
}
|
|
55
|
+
this.logger.info('Jasmine to Vitest Refactoring Summary:');
|
|
56
|
+
this.logger.info(`- ${this.filesScanned} test file(s) scanned.`);
|
|
57
|
+
this.logger.info(`- ${this.filesTransformed} file(s) transformed.`);
|
|
58
|
+
const filesSkipped = this.filesScanned - this.filesTransformed;
|
|
59
|
+
if (filesSkipped > 0) {
|
|
60
|
+
this.logger.info(`- ${filesSkipped} file(s) skipped (no changes needed).`);
|
|
61
|
+
}
|
|
62
|
+
if (this.todos.size > 0) {
|
|
63
|
+
const totalTodos = [...this.todos.values()].reduce((a, b) => a + b, 0);
|
|
64
|
+
this.logger.warn(`- ${totalTodos} TODO(s) added for manual review:`);
|
|
65
|
+
for (const [category, count] of this.todos) {
|
|
66
|
+
this.logger.warn(` - ${count}x ${category}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.RefactorReporter = RefactorReporter;
|
|
72
|
+
//# sourceMappingURL=refactor-reporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refactor-reporter.js","sourceRoot":"","sources":["refactor-reporter.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;AAGH,qHAAqF;AAGrF,MAAa,gBAAgB;IAM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AAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,UAAU,mCAAmC,CAAC,CAAC;YACrE,KAAK,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;gBAC3C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC,CAAC;YAChD,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAjED,4CAiEC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @fileoverview This file is the single source of truth for all "TODO" notes
|
|
10
|
+
* generated by the Jasmine to Vitest schematic.
|
|
11
|
+
*
|
|
12
|
+
* It defines the `TODO_NOTES` constant, which contains the message and optional
|
|
13
|
+
* documentation URL for each category of manual migration task.
|
|
14
|
+
*
|
|
15
|
+
* The file also exports advanced mapped types (`TodoCategory`, `TodoContextMap`)
|
|
16
|
+
* that are inferred directly from the `TODO_NOTES` object. This creates a
|
|
17
|
+
* maintainable, type-safe system that ensures consistency across all
|
|
18
|
+
* transformers and prevents runtime errors.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* The central configuration for all "TODO" notes. Each key represents a unique
|
|
22
|
+
* `TodoCategory`.
|
|
23
|
+
*
|
|
24
|
+
* Each entry is an object with:
|
|
25
|
+
* - `message`: A string or a function that returns a string. If it's a function,
|
|
26
|
+
* it receives a `context` object to generate a dynamic message.
|
|
27
|
+
* - `url`: An optional documentation URL that will be appended to the message.
|
|
28
|
+
*/
|
|
29
|
+
export declare const TODO_NOTES: {
|
|
30
|
+
readonly pending: {
|
|
31
|
+
readonly message: "The pending() function was converted to a skipped test (`it.skip`).";
|
|
32
|
+
readonly url: "https://vitest.dev/api/vi.html#it-skip";
|
|
33
|
+
};
|
|
34
|
+
readonly toHaveSpyInteractions: {
|
|
35
|
+
readonly message: string;
|
|
36
|
+
};
|
|
37
|
+
readonly toThrowMatching: {
|
|
38
|
+
readonly message: (context: {
|
|
39
|
+
name: string;
|
|
40
|
+
}) => string;
|
|
41
|
+
readonly url: "https://vitest.dev/api/expect.html#tothrowerror";
|
|
42
|
+
};
|
|
43
|
+
readonly toBePending: {
|
|
44
|
+
readonly message: string;
|
|
45
|
+
};
|
|
46
|
+
readonly 'unsupported-expect-async-matcher': {
|
|
47
|
+
readonly message: (context: {
|
|
48
|
+
name: string;
|
|
49
|
+
}) => string;
|
|
50
|
+
};
|
|
51
|
+
readonly 'arrayWithExactContents-dynamic-variable': {
|
|
52
|
+
readonly message: "Cannot transform jasmine.arrayWithExactContents with a dynamic variable. Please migrate this manually.";
|
|
53
|
+
};
|
|
54
|
+
readonly 'expect-nothing': {
|
|
55
|
+
readonly message: "expect().nothing() has been removed because it is redundant in Vitest. Tests without assertions pass by default.";
|
|
56
|
+
};
|
|
57
|
+
readonly 'unsupported-global-function': {
|
|
58
|
+
readonly message: (context: {
|
|
59
|
+
name: string;
|
|
60
|
+
}) => string;
|
|
61
|
+
};
|
|
62
|
+
readonly addMatchers: {
|
|
63
|
+
readonly message: "jasmine.addMatchers is not supported. Please manually migrate to expect.extend().";
|
|
64
|
+
readonly url: "https://vitest.dev/api/expect.html#expect-extend";
|
|
65
|
+
};
|
|
66
|
+
readonly addCustomEqualityTester: {
|
|
67
|
+
readonly message: "jasmine.addCustomEqualityTester is not supported. Please manually migrate to expect.addEqualityTesters().";
|
|
68
|
+
readonly url: "https://vitest.dev/api/expect.html#expect-addequalitytesters";
|
|
69
|
+
};
|
|
70
|
+
readonly mapContaining: {
|
|
71
|
+
readonly message: string;
|
|
72
|
+
};
|
|
73
|
+
readonly setContaining: {
|
|
74
|
+
readonly message: string;
|
|
75
|
+
};
|
|
76
|
+
readonly 'unknown-jasmine-property': {
|
|
77
|
+
readonly message: (context: {
|
|
78
|
+
name: string;
|
|
79
|
+
}) => string;
|
|
80
|
+
};
|
|
81
|
+
readonly spyOnAllFunctions: {
|
|
82
|
+
readonly message: string;
|
|
83
|
+
readonly url: "https://vitest.dev/api/vi.html#vi-spyon";
|
|
84
|
+
};
|
|
85
|
+
readonly 'createSpyObj-single-argument': {
|
|
86
|
+
readonly message: "jasmine.createSpyObj called with a single argument is not supported for transformation.";
|
|
87
|
+
readonly url: "https://vitest.dev/api/vi.html#vi-fn";
|
|
88
|
+
};
|
|
89
|
+
readonly 'createSpyObj-dynamic-variable': {
|
|
90
|
+
readonly message: "Cannot transform jasmine.createSpyObj with a dynamic variable. Please migrate this manually.";
|
|
91
|
+
readonly url: "https://vitest.dev/api/vi.html#vi-fn";
|
|
92
|
+
};
|
|
93
|
+
readonly 'createSpyObj-dynamic-property-map': {
|
|
94
|
+
readonly message: "Cannot transform jasmine.createSpyObj with a dynamic property map. Please migrate this manually.";
|
|
95
|
+
readonly url: "https://vitest.dev/api/vi.html#vi-fn";
|
|
96
|
+
};
|
|
97
|
+
readonly 'unsupported-spy-strategy': {
|
|
98
|
+
readonly message: (context: {
|
|
99
|
+
name: string;
|
|
100
|
+
}) => string;
|
|
101
|
+
readonly url: "https://vitest.dev/api/mocked.html#mock";
|
|
102
|
+
};
|
|
103
|
+
readonly 'mostRecent-without-args': {
|
|
104
|
+
readonly message: string;
|
|
105
|
+
readonly url: "https://vitest.dev/api/mocked.html#mock-lastcall";
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* A union type of all possible "TODO" categories.
|
|
110
|
+
* It is derived from the keys of the `TODO_NOTES` object to ensure that only
|
|
111
|
+
* valid categories can be used throughout the transformers.
|
|
112
|
+
*/
|
|
113
|
+
export type TodoCategory = keyof typeof TODO_NOTES;
|
|
114
|
+
/**
|
|
115
|
+
* A mapped type that creates a map from a `TodoCategory` to the type of the
|
|
116
|
+
* context object that its message function expects. This provides strong type
|
|
117
|
+
* safety for calls to `addTodoComment`.
|
|
118
|
+
*
|
|
119
|
+
* It works by checking if the `message` property for a given category is a
|
|
120
|
+
* function. If it is, it uses `infer` to extract the type of the first
|
|
121
|
+
* parameter (`P`). If it's not a function, it resolves to `never`.
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* // `Context` will be `{ name: string }`
|
|
125
|
+
* type Context = TodoContextMap['unknown-jasmine-property'];
|
|
126
|
+
*
|
|
127
|
+
* // `Context` will be `never`
|
|
128
|
+
* type Context = TodoContextMap['pending'];
|
|
129
|
+
*/
|
|
130
|
+
export type TodoContextMap = {
|
|
131
|
+
[K in TodoCategory]: (typeof TODO_NOTES)[K]['message'] extends (context: infer P) => string ? P : never;
|
|
132
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.TODO_NOTES = void 0;
|
|
11
|
+
/**
|
|
12
|
+
* @fileoverview This file is the single source of truth for all "TODO" notes
|
|
13
|
+
* generated by the Jasmine to Vitest schematic.
|
|
14
|
+
*
|
|
15
|
+
* It defines the `TODO_NOTES` constant, which contains the message and optional
|
|
16
|
+
* documentation URL for each category of manual migration task.
|
|
17
|
+
*
|
|
18
|
+
* The file also exports advanced mapped types (`TodoCategory`, `TodoContextMap`)
|
|
19
|
+
* that are inferred directly from the `TODO_NOTES` object. This creates a
|
|
20
|
+
* maintainable, type-safe system that ensures consistency across all
|
|
21
|
+
* transformers and prevents runtime errors.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* The central configuration for all "TODO" notes. Each key represents a unique
|
|
25
|
+
* `TodoCategory`.
|
|
26
|
+
*
|
|
27
|
+
* Each entry is an object with:
|
|
28
|
+
* - `message`: A string or a function that returns a string. If it's a function,
|
|
29
|
+
* it receives a `context` object to generate a dynamic message.
|
|
30
|
+
* - `url`: An optional documentation URL that will be appended to the message.
|
|
31
|
+
*/
|
|
32
|
+
exports.TODO_NOTES = {
|
|
33
|
+
'pending': {
|
|
34
|
+
message: 'The pending() function was converted to a skipped test (`it.skip`).',
|
|
35
|
+
url: 'https://vitest.dev/api/vi.html#it-skip',
|
|
36
|
+
},
|
|
37
|
+
'toHaveSpyInteractions': {
|
|
38
|
+
message: 'Unsupported matcher ".toHaveSpyInteractions()" found. ' +
|
|
39
|
+
'Please migrate this manually by checking the `mock.calls.length` of the individual spies.',
|
|
40
|
+
},
|
|
41
|
+
'toThrowMatching': {
|
|
42
|
+
message: (context) => `Unsupported matcher ".${context.name}()" found. Please migrate this manually.`,
|
|
43
|
+
url: 'https://vitest.dev/api/expect.html#tothrowerror',
|
|
44
|
+
},
|
|
45
|
+
'toBePending': {
|
|
46
|
+
message: 'Unsupported matcher ".toBePending()" found. Vitest does not have a direct equivalent. ' +
|
|
47
|
+
'Please migrate this manually, for example by using `Promise.race` to check if the promise settles within a short timeout.',
|
|
48
|
+
},
|
|
49
|
+
'unsupported-expect-async-matcher': {
|
|
50
|
+
message: (context) => `Unsupported expectAsync matcher ".${context.name}()" found. Please migrate this manually.`,
|
|
51
|
+
},
|
|
52
|
+
'arrayWithExactContents-dynamic-variable': {
|
|
53
|
+
message: 'Cannot transform jasmine.arrayWithExactContents with a dynamic variable. Please migrate this manually.',
|
|
54
|
+
},
|
|
55
|
+
'expect-nothing': {
|
|
56
|
+
message: 'expect().nothing() has been removed because it is redundant in Vitest. Tests without assertions pass by default.',
|
|
57
|
+
},
|
|
58
|
+
'unsupported-global-function': {
|
|
59
|
+
message: (context) => `Unsupported global function \`${context.name}\` found. This function is used for custom reporters in Jasmine ` +
|
|
60
|
+
'and has no direct equivalent in Vitest.',
|
|
61
|
+
},
|
|
62
|
+
'addMatchers': {
|
|
63
|
+
message: 'jasmine.addMatchers is not supported. Please manually migrate to expect.extend().',
|
|
64
|
+
url: 'https://vitest.dev/api/expect.html#expect-extend',
|
|
65
|
+
},
|
|
66
|
+
'addCustomEqualityTester': {
|
|
67
|
+
message: 'jasmine.addCustomEqualityTester is not supported. Please manually migrate to expect.addEqualityTesters().',
|
|
68
|
+
url: 'https://vitest.dev/api/expect.html#expect-addequalitytesters',
|
|
69
|
+
},
|
|
70
|
+
'mapContaining': {
|
|
71
|
+
message: 'jasmine.mapContaining is not supported. Vitest does not have a built-in matcher for Maps.' +
|
|
72
|
+
' Please manually assert the contents of the Map.',
|
|
73
|
+
},
|
|
74
|
+
'setContaining': {
|
|
75
|
+
message: 'jasmine.setContaining is not supported. Vitest does not have a built-in matcher for Sets.' +
|
|
76
|
+
' Please manually assert the contents of the Set.',
|
|
77
|
+
},
|
|
78
|
+
'unknown-jasmine-property': {
|
|
79
|
+
message: (context) => `Unsupported jasmine property "${context.name}" found. Please migrate this manually.`,
|
|
80
|
+
},
|
|
81
|
+
'spyOnAllFunctions': {
|
|
82
|
+
message: 'Vitest does not have a direct equivalent for jasmine.spyOnAllFunctions().' +
|
|
83
|
+
' Please spy on individual methods manually using vi.spyOn().',
|
|
84
|
+
url: 'https://vitest.dev/api/vi.html#vi-spyon',
|
|
85
|
+
},
|
|
86
|
+
'createSpyObj-single-argument': {
|
|
87
|
+
message: 'jasmine.createSpyObj called with a single argument is not supported for transformation.',
|
|
88
|
+
url: 'https://vitest.dev/api/vi.html#vi-fn',
|
|
89
|
+
},
|
|
90
|
+
'createSpyObj-dynamic-variable': {
|
|
91
|
+
message: 'Cannot transform jasmine.createSpyObj with a dynamic variable. Please migrate this manually.',
|
|
92
|
+
url: 'https://vitest.dev/api/vi.html#vi-fn',
|
|
93
|
+
},
|
|
94
|
+
'createSpyObj-dynamic-property-map': {
|
|
95
|
+
message: 'Cannot transform jasmine.createSpyObj with a dynamic property map. Please migrate this manually.',
|
|
96
|
+
url: 'https://vitest.dev/api/vi.html#vi-fn',
|
|
97
|
+
},
|
|
98
|
+
'unsupported-spy-strategy': {
|
|
99
|
+
message: (context) => `Unsupported spy strategy ".and.${context.name}()" found. Please migrate this manually.`,
|
|
100
|
+
url: 'https://vitest.dev/api/mocked.html#mock',
|
|
101
|
+
},
|
|
102
|
+
'mostRecent-without-args': {
|
|
103
|
+
message: 'Direct usage of mostRecent() is not supported.' +
|
|
104
|
+
' Please refactor to access .args directly or use vi.mocked(spy).mock.lastCall.',
|
|
105
|
+
url: 'https://vitest.dev/api/mocked.html#mock-lastcall',
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=todo-notes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"todo-notes.js","sourceRoot":"","sources":["todo-notes.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH;;;;;;;;;;;GAWG;AAEH;;;;;;;;GAQG;AACU,QAAA,UAAU,GAAG;IACxB,SAAS,EAAE;QACT,OAAO,EAAE,qEAAqE;QAC9E,GAAG,EAAE,wCAAwC;KAC9C;IACD,uBAAuB,EAAE;QACvB,OAAO,EACL,wDAAwD;YACxD,2FAA2F;KAC9F;IACD,iBAAiB,EAAE;QACjB,OAAO,EAAE,CAAC,OAAyB,EAAE,EAAE,CACrC,yBAAyB,OAAO,CAAC,IAAI,0CAA0C;QACjF,GAAG,EAAE,iDAAiD;KACvD;IACD,aAAa,EAAE;QACb,OAAO,EACL,wFAAwF;YACxF,2HAA2H;KAC9H;IACD,kCAAkC,EAAE;QAClC,OAAO,EAAE,CAAC,OAAyB,EAAE,EAAE,CACrC,qCAAqC,OAAO,CAAC,IAAI,0CAA0C;KAC9F;IACD,yCAAyC,EAAE;QACzC,OAAO,EACL,wGAAwG;KAC3G;IACD,gBAAgB,EAAE;QAChB,OAAO,EACL,kHAAkH;KACrH;IACD,6BAA6B,EAAE;QAC7B,OAAO,EAAE,CAAC,OAAyB,EAAE,EAAE,CACrC,iCAAiC,OAAO,CAAC,IAAI,kEAAkE;YAC/G,yCAAyC;KAC5C;IACD,aAAa,EAAE;QACb,OAAO,EAAE,mFAAmF;QAC5F,GAAG,EAAE,kDAAkD;KACxD;IACD,yBAAyB,EAAE;QACzB,OAAO,EACL,2GAA2G;QAC7G,GAAG,EAAE,8DAA8D;KACpE;IACD,eAAe,EAAE;QACf,OAAO,EACL,2FAA2F;YAC3F,kDAAkD;KACrD;IACD,eAAe,EAAE;QACf,OAAO,EACL,2FAA2F;YAC3F,kDAAkD;KACrD;IACD,0BAA0B,EAAE;QAC1B,OAAO,EAAE,CAAC,OAAyB,EAAE,EAAE,CACrC,iCAAiC,OAAO,CAAC,IAAI,wCAAwC;KACxF;IACD,mBAAmB,EAAE;QACnB,OAAO,EACL,2EAA2E;YAC3E,8DAA8D;QAChE,GAAG,EAAE,yCAAyC;KAC/C;IACD,8BAA8B,EAAE;QAC9B,OAAO,EACL,yFAAyF;QAC3F,GAAG,EAAE,sCAAsC;KAC5C;IACD,+BAA+B,EAAE;QAC/B,OAAO,EACL,8FAA8F;QAChG,GAAG,EAAE,sCAAsC;KAC5C;IACD,mCAAmC,EAAE;QACnC,OAAO,EACL,kGAAkG;QACpG,GAAG,EAAE,sCAAsC;KAC5C;IACD,0BAA0B,EAAE;QAC1B,OAAO,EAAE,CAAC,OAAyB,EAAE,EAAE,CACrC,kCAAkC,OAAO,CAAC,IAAI,0CAA0C;QAC1F,GAAG,EAAE,yCAAyC;KAC/C;IACD,yBAAyB,EAAE;QACzB,OAAO,EACL,gDAAgD;YAChD,gFAAgF;QAClF,GAAG,EAAE,kDAAkD;KACxD;CACO,CAAC"}
|
package/resolver/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAMH,4BAIC;AAPD,wEAAmE;AAGnE,mBAAyB,OAAwB;IAC/C,MAAM,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,eAAe,CAAC;IAE3F,OAAO,IAAA,uCAAiB,EAAC,EAAE,GAAG,OAAO,EAAE,sBAAsB,EAAE,CAAC,CAAC;AACnE,CAAC"}
|
package/resolver/schema.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["schema.ts"],"names":[],"mappings":";AACA,mFAAmF;AACnF,oFAAoF;;;AA6CpF;;;GAGG;AACH,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,4BAAW,CAAA;IACX,oCAAmB,CAAA;AACvB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { bootstrapApplication } from '@angular/platform-browser';
|
|
1
|
+
import { BootstrapContext, bootstrapApplication } from '@angular/platform-browser';
|
|
2
2
|
import { <%= appComponentName %> } from '<%= appComponentPath %>';
|
|
3
3
|
import { config } from './app/app.config.server';
|
|
4
4
|
|
|
5
|
-
const bootstrap = () =>
|
|
5
|
+
const bootstrap = (context: BootstrapContext) =>
|
|
6
|
+
bootstrapApplication(<%= appComponentName %>, config, context);
|
|
6
7
|
|
|
7
8
|
export default bootstrap;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { bootstrapApplication } from '@angular/platform-browser';
|
|
1
|
+
import { BootstrapContext, bootstrapApplication } from '@angular/platform-browser';
|
|
2
2
|
import { <%= appComponentName %> } from '<%= appComponentPath %>';
|
|
3
3
|
import { config } from './app/app.config.server';
|
|
4
4
|
|
|
5
|
-
const bootstrap = () =>
|
|
5
|
+
const bootstrap = (context: BootstrapContext) =>
|
|
6
|
+
bootstrapApplication(<%= appComponentName %>, config, context);
|
|
6
7
|
|
|
7
8
|
export default bootstrap;
|
package/server/index.d.ts
CHANGED
package/server/index.js
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* found in the LICENSE file at https://angular.dev/license
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.default = default_1;
|
|
11
10
|
const core_1 = require("@angular-devkit/core");
|
|
12
11
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
13
12
|
const node_path_1 = require("node:path");
|
|
@@ -17,6 +16,7 @@ const json_file_1 = require("../utility/json-file");
|
|
|
17
16
|
const latest_versions_1 = require("../utility/latest-versions");
|
|
18
17
|
const ng_ast_utils_1 = require("../utility/ng-ast-utils");
|
|
19
18
|
const paths_1 = require("../utility/paths");
|
|
19
|
+
const project_1 = require("../utility/project");
|
|
20
20
|
const project_targets_1 = require("../utility/project-targets");
|
|
21
21
|
const app_component_1 = require("../utility/standalone/app_component");
|
|
22
22
|
const util_1 = require("../utility/standalone/util");
|
|
@@ -132,74 +132,71 @@ function addDependencies(skipInstall) {
|
|
|
132
132
|
]);
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
componentImportPathInSameFile: './app/app',
|
|
161
|
-
moduleName: 'AppModule',
|
|
162
|
-
moduleImportPathInSameFile: './app/app.module',
|
|
163
|
-
};
|
|
164
|
-
const templateSource = (0, schematics_1.apply)((0, schematics_1.url)(filesUrl), [
|
|
165
|
-
(0, schematics_1.applyTemplates)({
|
|
166
|
-
...schematics_1.strings,
|
|
167
|
-
...options,
|
|
168
|
-
appComponentName: componentName,
|
|
169
|
-
appComponentPath: componentImportPathInSameFile,
|
|
170
|
-
appModuleName: moduleName,
|
|
171
|
-
appModulePath: moduleImportPathInSameFile === null
|
|
172
|
-
? null
|
|
173
|
-
: `./${node_path_1.posix.basename(moduleImportPathInSameFile)}`,
|
|
174
|
-
}),
|
|
175
|
-
(0, schematics_1.move)(sourceRoot),
|
|
176
|
-
]);
|
|
177
|
-
const clientTsConfig = (0, core_1.normalize)(clientBuildOptions.tsConfig);
|
|
178
|
-
const tsConfigExtends = (0, core_1.basename)(clientTsConfig);
|
|
179
|
-
const tsConfigDirectory = (0, core_1.dirname)(clientTsConfig);
|
|
180
|
-
return (0, schematics_1.chain)([
|
|
181
|
-
(0, schematics_1.mergeWith)(templateSource),
|
|
182
|
-
...(usingApplicationBuilder
|
|
183
|
-
? [
|
|
184
|
-
updateConfigFileApplicationBuilder(options),
|
|
185
|
-
updateTsConfigFile(clientBuildOptions.tsConfig),
|
|
186
|
-
]
|
|
187
|
-
: [
|
|
188
|
-
(0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files/server-builder/root'), [
|
|
189
|
-
(0, schematics_1.applyTemplates)({
|
|
190
|
-
...schematics_1.strings,
|
|
191
|
-
...options,
|
|
192
|
-
stripTsExtension: (s) => s.replace(/\.ts$/, ''),
|
|
193
|
-
tsConfigExtends,
|
|
194
|
-
hasLocalizePackage: !!(0, dependencies_1.getPackageJsonDependency)(host, '@angular/localize'),
|
|
195
|
-
relativePathToWorkspaceRoot: (0, paths_1.relativePathToWorkspaceRoot)(tsConfigDirectory),
|
|
196
|
-
}),
|
|
197
|
-
(0, schematics_1.move)(tsConfigDirectory),
|
|
198
|
-
])),
|
|
199
|
-
updateConfigFileBrowserBuilder(options, tsConfigDirectory),
|
|
200
|
-
]),
|
|
201
|
-
addDependencies(options.skipInstall),
|
|
202
|
-
(0, utility_1.addRootProvider)(options.project, ({ code, external }) => code `${external('provideClientHydration', '@angular/platform-browser')}(${external('withEventReplay', '@angular/platform-browser')}())`),
|
|
203
|
-
]);
|
|
135
|
+
exports.default = (0, project_1.createProjectSchematic)(async (options, { project, tree }) => {
|
|
136
|
+
if (project?.extensions.projectType !== 'application') {
|
|
137
|
+
throw new schematics_1.SchematicsException(`Server schematic requires a project type of "application".`);
|
|
138
|
+
}
|
|
139
|
+
const clientBuildTarget = project.targets.get('build');
|
|
140
|
+
if (!clientBuildTarget) {
|
|
141
|
+
throw (0, project_targets_1.targetBuildNotFoundError)();
|
|
142
|
+
}
|
|
143
|
+
const usingApplicationBuilder = (0, project_targets_1.isUsingApplicationBuilder)(project);
|
|
144
|
+
if (project.targets.has('server') ||
|
|
145
|
+
(usingApplicationBuilder && clientBuildTarget.options?.server !== undefined)) {
|
|
146
|
+
// Server has already been added.
|
|
147
|
+
return (0, schematics_1.noop)();
|
|
148
|
+
}
|
|
149
|
+
const clientBuildOptions = clientBuildTarget.options;
|
|
150
|
+
const browserEntryPoint = await (0, util_1.getMainFilePath)(tree, options.project);
|
|
151
|
+
const isStandalone = (0, ng_ast_utils_1.isStandaloneApp)(tree, browserEntryPoint);
|
|
152
|
+
const sourceRoot = project.sourceRoot ?? (0, core_1.join)((0, core_1.normalize)(project.root), 'src');
|
|
153
|
+
let filesUrl = `./files/${usingApplicationBuilder ? 'application-builder/' : 'server-builder/'}`;
|
|
154
|
+
filesUrl += isStandalone ? 'standalone-src' : 'ngmodule-src';
|
|
155
|
+
const { componentName, componentImportPathInSameFile, moduleName, moduleImportPathInSameFile } = (0, app_component_1.resolveBootstrappedComponentData)(tree, browserEntryPoint) || {
|
|
156
|
+
componentName: 'App',
|
|
157
|
+
componentImportPathInSameFile: './app/app',
|
|
158
|
+
moduleName: 'AppModule',
|
|
159
|
+
moduleImportPathInSameFile: './app/app.module',
|
|
204
160
|
};
|
|
205
|
-
|
|
161
|
+
const templateSource = (0, schematics_1.apply)((0, schematics_1.url)(filesUrl), [
|
|
162
|
+
(0, schematics_1.applyTemplates)({
|
|
163
|
+
...schematics_1.strings,
|
|
164
|
+
...options,
|
|
165
|
+
appComponentName: componentName,
|
|
166
|
+
appComponentPath: componentImportPathInSameFile,
|
|
167
|
+
appModuleName: moduleName,
|
|
168
|
+
appModulePath: moduleImportPathInSameFile === null
|
|
169
|
+
? null
|
|
170
|
+
: `./${node_path_1.posix.basename(moduleImportPathInSameFile)}`,
|
|
171
|
+
}),
|
|
172
|
+
(0, schematics_1.move)(sourceRoot),
|
|
173
|
+
]);
|
|
174
|
+
const clientTsConfig = (0, core_1.normalize)(clientBuildOptions.tsConfig);
|
|
175
|
+
const tsConfigExtends = (0, core_1.basename)(clientTsConfig);
|
|
176
|
+
const tsConfigDirectory = (0, core_1.dirname)(clientTsConfig);
|
|
177
|
+
return (0, schematics_1.chain)([
|
|
178
|
+
(0, schematics_1.mergeWith)(templateSource),
|
|
179
|
+
...(usingApplicationBuilder
|
|
180
|
+
? [
|
|
181
|
+
updateConfigFileApplicationBuilder(options),
|
|
182
|
+
updateTsConfigFile(clientBuildOptions.tsConfig),
|
|
183
|
+
]
|
|
184
|
+
: [
|
|
185
|
+
(0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files/server-builder/root'), [
|
|
186
|
+
(0, schematics_1.applyTemplates)({
|
|
187
|
+
...schematics_1.strings,
|
|
188
|
+
...options,
|
|
189
|
+
stripTsExtension: (s) => s.replace(/\.ts$/, ''),
|
|
190
|
+
tsConfigExtends,
|
|
191
|
+
hasLocalizePackage: !!(0, dependencies_1.getPackageJsonDependency)(tree, '@angular/localize'),
|
|
192
|
+
relativePathToWorkspaceRoot: (0, paths_1.relativePathToWorkspaceRoot)(tsConfigDirectory),
|
|
193
|
+
}),
|
|
194
|
+
(0, schematics_1.move)(tsConfigDirectory),
|
|
195
|
+
])),
|
|
196
|
+
updateConfigFileBrowserBuilder(options, tsConfigDirectory),
|
|
197
|
+
]),
|
|
198
|
+
addDependencies(options.skipInstall),
|
|
199
|
+
(0, utility_1.addRootProvider)(options.project, ({ code, external }) => code `${external('provideClientHydration', '@angular/platform-browser')}(${external('withEventReplay', '@angular/platform-browser')}())`),
|
|
200
|
+
]);
|
|
201
|
+
});
|
|
202
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,+CAA2F;AAC3F,2DAYoC;AACpC,yCAAkC;AAClC,wCAA6F;AAC7F,0DAAmE;AACnE,oDAAgD;AAChD,gEAA4D;AAC5D,0DAA0D;AAC1D,4CAA+D;AAC/D,gDAA4D;AAC5D,gEAAiG;AACjG,uEAAuF;AACvF,qDAA6D;AAC7D,oDAAuD;AACvD,kEAAuD;AAGvD,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAE7C,SAAS,8BAA8B,CAAC,OAAsB,EAAE,iBAAuB;IACrF,OAAO,IAAA,2BAAe,EAAC,CAAC,SAAS,EAAE,EAAE;QACnC,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAE9D,IAAI,aAAa,EAAE,CAAC;YAClB,gDAAgD;YAChD,oDAAoD;YACpD,uDAAuD;YACvD,2FAA2F;YAC3F,MAAM,gBAAgB,GAAG,CAAC,UAAiD,EAAE,EAAM,EAAE;gBACnF,OAAO;oBACL,cAAc,EAAE,OAAO,EAAE,cAAc;oBACvC,aAAa,EAAE,OAAO,EAAE,aAAa,KAAK,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,aAAa;oBAClF,gBAAgB,EAAE,OAAO,EAAE,gBAAgB;oBAC3C,YAAY,EAAE,OAAO,EAAE,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,YAAY;oBACvF,SAAS,EAAE,OAAO,EAAE,SAAS;oBAC7B,YAAY,EAAE,OAAO,EAAE,YA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"mappings":";AACA,mFAAmF;AACnF,oFAAoF"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { TestBed } from '@angular/core/testing';
|
|
2
2
|
|
|
3
|
-
import { <%=
|
|
3
|
+
import { <%= classifiedName %> } from './<%= dasherize(name) %><%= type ? '.' + dasherize(type) : '' %>';
|
|
4
4
|
|
|
5
|
-
describe('<%=
|
|
6
|
-
let service: <%=
|
|
5
|
+
describe('<%= classifiedName %>', () => {
|
|
6
|
+
let service: <%= classifiedName %>;
|
|
7
7
|
|
|
8
8
|
beforeEach(() => {
|
|
9
9
|
TestBed.configureTestingModule({});
|
|
10
|
-
service = TestBed.inject(<%=
|
|
10
|
+
service = TestBed.inject(<%= classifiedName %>);
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
it('should be created', () => {
|