Browse Source

Merge pull request #13886 from abpframework/update-angular-14

Update angular 14
pull/14122/head
Alper Ebiçoğlu 4 years ago
committed by GitHub
parent
commit
981d007ee6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 40
      npm/ng-packs/angular.json
  2. 3
      npm/ng-packs/apps/dev-app/jest.config.ts
  3. 3
      npm/ng-packs/apps/dev-app/tsconfig.app.json
  4. 3
      npm/ng-packs/apps/dev-app/tsconfig.json
  5. 2
      npm/ng-packs/apps/dev-app/tsconfig.spec.json
  6. 5
      npm/ng-packs/jest.config.js
  7. 5
      npm/ng-packs/jest.config.ts
  8. 2
      npm/ng-packs/jest.preset.js
  9. 86
      npm/ng-packs/migrations.json
  10. 24
      npm/ng-packs/nx.json
  11. 95
      npm/ng-packs/package.json
  12. 3
      npm/ng-packs/packages/account-core/jest.config.ts
  13. 5
      npm/ng-packs/packages/account-core/tsconfig.json
  14. 4
      npm/ng-packs/packages/account-core/tsconfig.lib.json
  15. 2
      npm/ng-packs/packages/account-core/tsconfig.spec.json
  16. 3
      npm/ng-packs/packages/account/jest.config.ts
  17. 8
      npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts
  18. 6
      npm/ng-packs/packages/account/src/lib/components/forgot-password/forgot-password.component.ts
  19. 6
      npm/ng-packs/packages/account/src/lib/components/login/login.component.ts
  20. 4
      npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings-half-row.component.ts
  21. 6
      npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts
  22. 6
      npm/ng-packs/packages/account/src/lib/components/register/register.component.ts
  23. 6
      npm/ng-packs/packages/account/src/lib/components/reset-password/reset-password.component.ts
  24. 5
      npm/ng-packs/packages/account/tsconfig.json
  25. 4
      npm/ng-packs/packages/account/tsconfig.lib.json
  26. 2
      npm/ng-packs/packages/account/tsconfig.spec.json
  27. 3
      npm/ng-packs/packages/components/jest.config.ts
  28. 2
      npm/ng-packs/packages/components/package.json
  29. 5
      npm/ng-packs/packages/components/tsconfig.json
  30. 4
      npm/ng-packs/packages/components/tsconfig.lib.json
  31. 2
      npm/ng-packs/packages/components/tsconfig.spec.json
  32. 3
      npm/ng-packs/packages/core/jest.config.ts
  33. 45
      npm/ng-packs/packages/core/src/lib/directives/ellipsis.directive.ts
  34. 8
      npm/ng-packs/packages/core/src/lib/directives/form-submit.directive.ts
  35. 2
      npm/ng-packs/packages/core/src/lib/directives/permission.directive.ts
  36. 5
      npm/ng-packs/packages/core/src/lib/handlers/routes.handler.ts
  37. 17
      npm/ng-packs/packages/core/src/lib/services/config-state.service.ts
  38. 2
      npm/ng-packs/packages/core/src/lib/services/http-wait.service.ts
  39. 2
      npm/ng-packs/packages/core/src/lib/services/list.service.ts
  40. 2
      npm/ng-packs/packages/core/src/lib/services/router-wait.service.ts
  41. 9
      npm/ng-packs/packages/core/src/lib/tests/api.interceptor.spec.ts
  42. 2
      npm/ng-packs/packages/core/src/lib/tests/container.strategy.spec.ts
  43. 2
      npm/ng-packs/packages/core/src/lib/tests/dom.strategy.spec.ts
  44. 2
      npm/ng-packs/packages/core/src/lib/tests/environment-utils.spec.ts
  45. 36
      npm/ng-packs/packages/core/src/lib/tests/environment.service.spec.ts
  46. 2
      npm/ng-packs/packages/core/src/lib/tests/generator-utils.spec.ts
  47. 12
      npm/ng-packs/packages/core/src/lib/tests/initial-utils.spec.ts
  48. 4
      npm/ng-packs/packages/core/src/lib/tests/internal-store.spec.ts
  49. 6
      npm/ng-packs/packages/core/src/lib/tests/lazy-load-utils.spec.ts
  50. 4
      npm/ng-packs/packages/core/src/lib/tests/lazy-load.service.spec.ts
  51. 6
      npm/ng-packs/packages/core/src/lib/tests/loading.strategy.spec.ts
  52. 4
      npm/ng-packs/packages/core/src/lib/tests/locale.provider.spec.ts
  53. 4
      npm/ng-packs/packages/core/src/lib/tests/localization.pipe.spec.ts
  54. 3
      npm/ng-packs/packages/core/src/lib/tests/localization.service.spec.ts
  55. 2
      npm/ng-packs/packages/core/src/lib/tests/permission.directive.spec.ts
  56. 5
      npm/ng-packs/packages/core/src/lib/tests/permission.guard.spec.ts
  57. 18
      npm/ng-packs/packages/core/src/lib/tests/projection.strategy.spec.ts
  58. 4
      npm/ng-packs/packages/core/src/lib/tests/replaceable-template.directive.spec.ts
  59. 7
      npm/ng-packs/packages/core/src/lib/tests/rest.service.spec.ts
  60. 2
      npm/ng-packs/packages/core/src/lib/tests/route-utils.spec.ts
  61. 4
      npm/ng-packs/packages/core/src/lib/tests/routes.handler.spec.ts
  62. 4
      npm/ng-packs/packages/core/src/lib/tests/routes.service.spec.ts
  63. 7
      npm/ng-packs/packages/core/src/lib/tests/validators.spec.ts
  64. 6
      npm/ng-packs/packages/core/src/lib/validators/url.validator.ts
  65. 3
      npm/ng-packs/packages/core/tsconfig.json
  66. 4
      npm/ng-packs/packages/core/tsconfig.lib.json
  67. 2
      npm/ng-packs/packages/core/tsconfig.spec.json
  68. 3
      npm/ng-packs/packages/feature-management/jest.config.ts
  69. 5
      npm/ng-packs/packages/feature-management/tsconfig.json
  70. 4
      npm/ng-packs/packages/feature-management/tsconfig.lib.json
  71. 2
      npm/ng-packs/packages/feature-management/tsconfig.spec.json
  72. 3
      npm/ng-packs/packages/identity/jest.config.ts
  73. 4
      npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.ts
  74. 10
      npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts
  75. 5
      npm/ng-packs/packages/identity/tsconfig.json
  76. 4
      npm/ng-packs/packages/identity/tsconfig.lib.json
  77. 2
      npm/ng-packs/packages/identity/tsconfig.spec.json
  78. 3
      npm/ng-packs/packages/permission-management/jest.config.ts
  79. 5
      npm/ng-packs/packages/permission-management/tsconfig.json
  80. 4
      npm/ng-packs/packages/permission-management/tsconfig.lib.json
  81. 2
      npm/ng-packs/packages/permission-management/tsconfig.spec.json
  82. 3
      npm/ng-packs/packages/schematics/jest.config.ts
  83. 9
      npm/ng-packs/packages/schematics/package.json
  84. 3
      npm/ng-packs/packages/schematics/src/commands/api/index.ts
  85. 2
      npm/ng-packs/packages/schematics/src/commands/create-lib/files-package/__libraryName@kebab__/tsconfig.lib.json.template
  86. 9
      npm/ng-packs/packages/schematics/src/commands/create-lib/index.ts
  87. 4
      npm/ng-packs/packages/schematics/src/commands/proxy-add/index.ts
  88. 4
      npm/ng-packs/packages/schematics/src/commands/proxy-index/index.ts
  89. 4
      npm/ng-packs/packages/schematics/src/commands/proxy-refresh/index.ts
  90. 4
      npm/ng-packs/packages/schematics/src/commands/proxy-remove/index.ts
  91. 4
      npm/ng-packs/packages/schematics/src/models/api-definition.ts
  92. 2
      npm/ng-packs/packages/schematics/src/utils/angular/README.md
  93. 173
      npm/ng-packs/packages/schematics/src/utils/angular/dependency.ts
  94. 4
      npm/ng-packs/packages/schematics/src/utils/angular/find-module.ts
  95. 15
      npm/ng-packs/packages/schematics/src/utils/angular/generate-from-files.ts
  96. 7
      npm/ng-packs/packages/schematics/src/utils/angular/json-file.ts
  97. 25
      npm/ng-packs/packages/schematics/src/utils/angular/latest-versions/package.json
  98. 12
      npm/ng-packs/packages/schematics/src/utils/angular/ng-ast-utils.ts
  99. 13
      npm/ng-packs/packages/schematics/src/utils/angular/validation.ts
  100. 15
      npm/ng-packs/packages/schematics/src/utils/angular/workspace-models.ts

40
npm/ng-packs/angular.json

@ -2,6 +2,7 @@
"version": 1, "version": 1,
"projects": { "projects": {
"account": { "account": {
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library", "projectType": "library",
"root": "packages/account", "root": "packages/account",
"sourceRoot": "packages/account/src", "sourceRoot": "packages/account/src",
@ -27,7 +28,7 @@
"builder": "@nrwl/jest:jest", "builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/account"], "outputs": ["coverage/packages/account"],
"options": { "options": {
"jestConfig": "packages/account/jest.config.js", "jestConfig": "packages/account/jest.config.ts",
"passWithNoTests": true "passWithNoTests": true
} }
}, },
@ -43,6 +44,7 @@
"implicitDependencies": ["core", "theme-shared", "account-core"] "implicitDependencies": ["core", "theme-shared", "account-core"]
}, },
"account-core": { "account-core": {
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library", "projectType": "library",
"root": "packages/account-core", "root": "packages/account-core",
"sourceRoot": "packages/account-core/src", "sourceRoot": "packages/account-core/src",
@ -68,7 +70,7 @@
"builder": "@nrwl/jest:jest", "builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/account-core"], "outputs": ["coverage/packages/account-core"],
"options": { "options": {
"jestConfig": "packages/account-core/jest.config.js", "jestConfig": "packages/account-core/jest.config.ts",
"passWithNoTests": true "passWithNoTests": true
} }
}, },
@ -87,6 +89,7 @@
"implicitDependencies": ["core", "theme-shared"] "implicitDependencies": ["core", "theme-shared"]
}, },
"components": { "components": {
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library", "projectType": "library",
"root": "packages/components", "root": "packages/components",
"sourceRoot": "packages/components/src", "sourceRoot": "packages/components/src",
@ -112,7 +115,7 @@
"builder": "@nrwl/jest:jest", "builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/components"], "outputs": ["coverage/packages/components"],
"options": { "options": {
"jestConfig": "packages/components/jest.config.js", "jestConfig": "packages/components/jest.config.ts",
"passWithNoTests": true "passWithNoTests": true
} }
}, },
@ -131,6 +134,7 @@
"implicitDependencies": ["core", "theme-shared"] "implicitDependencies": ["core", "theme-shared"]
}, },
"core": { "core": {
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library", "projectType": "library",
"root": "packages/core", "root": "packages/core",
"sourceRoot": "packages/core/src", "sourceRoot": "packages/core/src",
@ -156,7 +160,7 @@
"builder": "@nrwl/jest:jest", "builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/core"], "outputs": ["coverage/packages/core"],
"options": { "options": {
"jestConfig": "packages/core/jest.config.js", "jestConfig": "packages/core/jest.config.ts",
"passWithNoTests": true "passWithNoTests": true
} }
}, },
@ -171,6 +175,7 @@
"tags": [] "tags": []
}, },
"dev-app": { "dev-app": {
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application", "projectType": "application",
"root": "apps/dev-app", "root": "apps/dev-app",
"sourceRoot": "apps/dev-app/src", "sourceRoot": "apps/dev-app/src",
@ -290,13 +295,14 @@
"builder": "@nrwl/jest:jest", "builder": "@nrwl/jest:jest",
"outputs": ["coverage/apps/dev-app"], "outputs": ["coverage/apps/dev-app"],
"options": { "options": {
"jestConfig": "apps/dev-app/jest.config.js", "jestConfig": "apps/dev-app/jest.config.ts",
"passWithNoTests": true "passWithNoTests": true
} }
} }
} }
}, },
"dev-app-e2e": { "dev-app-e2e": {
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"root": "apps/dev-app-e2e", "root": "apps/dev-app-e2e",
"sourceRoot": "apps/dev-app-e2e/src", "sourceRoot": "apps/dev-app-e2e/src",
"projectType": "application", "projectType": "application",
@ -326,6 +332,7 @@
"implicitDependencies": ["dev-app"] "implicitDependencies": ["dev-app"]
}, },
"feature-management": { "feature-management": {
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library", "projectType": "library",
"root": "packages/feature-management", "root": "packages/feature-management",
"sourceRoot": "packages/feature-management/src", "sourceRoot": "packages/feature-management/src",
@ -351,7 +358,7 @@
"builder": "@nrwl/jest:jest", "builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/feature-management"], "outputs": ["coverage/packages/feature-management"],
"options": { "options": {
"jestConfig": "packages/feature-management/jest.config.js", "jestConfig": "packages/feature-management/jest.config.ts",
"passWithNoTests": true "passWithNoTests": true
} }
}, },
@ -370,6 +377,7 @@
"implicitDependencies": ["core", "theme-shared"] "implicitDependencies": ["core", "theme-shared"]
}, },
"identity": { "identity": {
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library", "projectType": "library",
"root": "packages/identity", "root": "packages/identity",
"sourceRoot": "packages/identity/src", "sourceRoot": "packages/identity/src",
@ -395,7 +403,7 @@
"builder": "@nrwl/jest:jest", "builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/identity"], "outputs": ["coverage/packages/identity"],
"options": { "options": {
"jestConfig": "packages/identity/jest.config.js", "jestConfig": "packages/identity/jest.config.ts",
"passWithNoTests": true "passWithNoTests": true
} }
}, },
@ -411,6 +419,7 @@
"implicitDependencies": ["core", "theme-shared", "permission-management"] "implicitDependencies": ["core", "theme-shared", "permission-management"]
}, },
"permission-management": { "permission-management": {
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library", "projectType": "library",
"root": "packages/permission-management", "root": "packages/permission-management",
"sourceRoot": "packages/permission-management/src", "sourceRoot": "packages/permission-management/src",
@ -436,7 +445,7 @@
"builder": "@nrwl/jest:jest", "builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/permission-management"], "outputs": ["coverage/packages/permission-management"],
"options": { "options": {
"jestConfig": "packages/permission-management/jest.config.js", "jestConfig": "packages/permission-management/jest.config.ts",
"passWithNoTests": true "passWithNoTests": true
} }
}, },
@ -455,6 +464,7 @@
"implicitDependencies": ["core", "theme-shared"] "implicitDependencies": ["core", "theme-shared"]
}, },
"schematics": { "schematics": {
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library", "projectType": "library",
"root": "packages/schematics", "root": "packages/schematics",
"sourceRoot": "packages/schematics/src", "sourceRoot": "packages/schematics/src",
@ -464,7 +474,7 @@
"builder": "@nrwl/jest:jest", "builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/schematics"], "outputs": ["coverage/packages/schematics"],
"options": { "options": {
"jestConfig": "packages/schematics/jest.config.js", "jestConfig": "packages/schematics/jest.config.ts",
"passWithNoTests": true "passWithNoTests": true
} }
}, },
@ -482,6 +492,7 @@
"tags": [] "tags": []
}, },
"setting-management": { "setting-management": {
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library", "projectType": "library",
"root": "packages/setting-management", "root": "packages/setting-management",
"sourceRoot": "packages/setting-management/src", "sourceRoot": "packages/setting-management/src",
@ -507,7 +518,7 @@
"builder": "@nrwl/jest:jest", "builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/setting-management"], "outputs": ["coverage/packages/setting-management"],
"options": { "options": {
"jestConfig": "packages/setting-management/jest.config.js", "jestConfig": "packages/setting-management/jest.config.ts",
"passWithNoTests": true "passWithNoTests": true
} }
}, },
@ -526,6 +537,7 @@
"implicitDependencies": ["core", "theme-shared", "components"] "implicitDependencies": ["core", "theme-shared", "components"]
}, },
"tenant-management": { "tenant-management": {
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library", "projectType": "library",
"root": "packages/tenant-management", "root": "packages/tenant-management",
"sourceRoot": "packages/tenant-management/src", "sourceRoot": "packages/tenant-management/src",
@ -551,7 +563,7 @@
"builder": "@nrwl/jest:jest", "builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/tenant-management"], "outputs": ["coverage/packages/tenant-management"],
"options": { "options": {
"jestConfig": "packages/tenant-management/jest.config.js", "jestConfig": "packages/tenant-management/jest.config.ts",
"passWithNoTests": true "passWithNoTests": true
} }
}, },
@ -570,6 +582,7 @@
"implicitDependencies": ["core", "theme-shared", "feature-management"] "implicitDependencies": ["core", "theme-shared", "feature-management"]
}, },
"theme-basic": { "theme-basic": {
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library", "projectType": "library",
"root": "packages/theme-basic", "root": "packages/theme-basic",
"sourceRoot": "packages/theme-basic/src", "sourceRoot": "packages/theme-basic/src",
@ -595,7 +608,7 @@
"builder": "@nrwl/jest:jest", "builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/theme-basic"], "outputs": ["coverage/packages/theme-basic"],
"options": { "options": {
"jestConfig": "packages/theme-basic/jest.config.js", "jestConfig": "packages/theme-basic/jest.config.ts",
"passWithNoTests": true "passWithNoTests": true
} }
}, },
@ -614,6 +627,7 @@
"implicitDependencies": ["core", "theme-shared", "account-core"] "implicitDependencies": ["core", "theme-shared", "account-core"]
}, },
"theme-shared": { "theme-shared": {
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library", "projectType": "library",
"root": "packages/theme-shared", "root": "packages/theme-shared",
"sourceRoot": "packages/theme-shared/src", "sourceRoot": "packages/theme-shared/src",
@ -639,7 +653,7 @@
"builder": "@nrwl/jest:jest", "builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/theme-shared"], "outputs": ["coverage/packages/theme-shared"],
"options": { "options": {
"jestConfig": "packages/theme-shared/jest.config.js", "jestConfig": "packages/theme-shared/jest.config.ts",
"passWithNoTests": true "passWithNoTests": true
} }
}, },

3
npm/ng-packs/apps/dev-app/jest.config.js → npm/ng-packs/apps/dev-app/jest.config.ts

@ -1,4 +1,5 @@
module.exports = { /* eslint-disable */
export default {
displayName: 'dev-app', displayName: 'dev-app',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],

3
npm/ng-packs/apps/dev-app/tsconfig.app.json

@ -5,5 +5,6 @@
"types": [] "types": []
}, },
"files": ["src/main.ts", "src/polyfills.ts"], "files": ["src/main.ts", "src/polyfills.ts"],
"include": ["src/**/*.d.ts"] "include": ["src/**/*.d.ts"],
"exclude": ["jest.config.ts"]
} }

3
npm/ng-packs/apps/dev-app/tsconfig.json

@ -18,7 +18,8 @@
"strict": false, "strict": false,
"noImplicitReturns": false, "noImplicitReturns": false,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"allowSyntheticDefaultImports": true "allowSyntheticDefaultImports": true,
"target": "es2020"
}, },
"angularCompilerOptions": { "angularCompilerOptions": {
"strictInjectionParameters": true, "strictInjectionParameters": true,

2
npm/ng-packs/apps/dev-app/tsconfig.spec.json

@ -7,5 +7,5 @@
"esModuleInterop": true "esModuleInterop": true
}, },
"files": ["src/test-setup.ts"], "files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"] "include": ["**/*.spec.ts", "**/*.d.ts", "jest.config.ts"]
} }

5
npm/ng-packs/jest.config.js

@ -1,5 +0,0 @@
const { getJestProjects } = require('@nrwl/jest');
module.exports = {
projects: getJestProjects(),
};

5
npm/ng-packs/jest.config.ts

@ -0,0 +1,5 @@
import { getJestProjects } from '@nrwl/jest';
export default {
projects: getJestProjects(),
};

2
npm/ng-packs/jest.preset.js

@ -1,3 +1,3 @@
const nxPreset = require('@nrwl/jest/preset'); const nxPreset = require('@nrwl/jest/preset').default;
module.exports = { ...nxPreset }; module.exports = { ...nxPreset };

86
npm/ng-packs/migrations.json

@ -1,84 +1,44 @@
{ {
"migrations": [ "migrations": [
{ {
"version": "13.6.0-beta.0",
"description": "Remove old options that are no longer used",
"cli": "nx", "cli": "nx",
"implementation": "./src/migrations/update-13-6-0/remove-old-task-runner-options", "version": "14.6.0-beta.0",
"package": "@nrwl/workspace", "description": "Update the @angular/cli package version to ~14.2.0.",
"name": "13-6-0-remove-old-task-runner-options" "factory": "./src/migrations/update-14-6-0/update-angular-cli",
},
{
"version": "13.9.0-beta.0",
"description": "Replace @nrwl/tao with nx",
"cli": "nx",
"implementation": "./src/migrations/update-13-9-0/replace-tao-with-nx",
"package": "@nrwl/workspace",
"name": "13-9-0-replace-tao-with-nx"
},
{
"version": "13.10.0-beta.0",
"description": "Update the decorate-angular-cli script to require nx instead of @nrwl/cli",
"cli": "nx",
"implementation": "./src/migrations/update-13-10-0/update-decorate-cli",
"package": "@nrwl/workspace",
"name": "13-10-0-update-decorate-cli"
},
{
"version": "13.10.0-beta.0",
"description": "Update the tasks runner property to import it from the nx package instead of @nrwl/worksapce",
"cli": "nx",
"implementation": "./src/migrations/update-13-10-0/update-tasks-runner",
"package": "@nrwl/workspace",
"name": "13-10-0-update-tasks-runner"
},
{
"cli": "nx",
"version": "13.4.5-beta.7",
"description": "Remove the default for the invalid 'style' option for the library generator if configured.",
"factory": "./src/migrations/update-13-5-0/remove-library-generator-style-default",
"package": "@nrwl/angular",
"name": "remove-library-generator-style-default"
},
{
"cli": "nx",
"version": "13.5.0-beta.0",
"description": "A lot of changes to how MFEs operate were discovered and merged without appropriate migrations. This should cover migrating existing MFEs to the latest, using ESM and optmized production bundles.",
"factory": "./src/migrations/update-13-5-0/update-mfe-configs",
"package": "@nrwl/angular", "package": "@nrwl/angular",
"name": "fix-incorrect-mfe-setups" "name": "update-angular-cli-version-14-2-0"
}, },
{ {
"cli": "nx", "cli": "nx",
"version": "13.8.1", "version": "14.6.1-beta.0",
"description": "Angular doesn't attach styles.js to index.html with type=module in dev mode, meaning an error is written to the console. Cypress falls over on this error. Add logic to Cypress e2e projects to ignore this error.", "description": "Change Cypress e2e and component testing presets to use __filename instead of __dirname and include a devServerTarget for component testing.",
"factory": "./src/migrations/update-13-8-1/add-cypress-mfe-workaround", "factory": "./src/migrations/update-14-6-1/update-cypress-configs-presets",
"package": "@nrwl/angular", "package": "@nrwl/cypress",
"name": "add-cypress-mfe-workaround" "name": "update-cypress-configs-preset"
}, },
{ {
"cli": "nx", "cli": "nx",
"version": "13.8.4", "version": "14.7.0-beta.0",
"description": "Karma coverage is broken since Angular 13 upgarde and the karma config is severely out of date. Bring it up to date fixing the coverage issue.", "description": "Update Cypress if using v10 to support latest component testing features",
"factory": "./src/migrations/update-13-8-4/migrate-karma-conf", "factory": "./src/migrations/update-14-7-0/update-cypress-version-if-10",
"package": "@nrwl/angular", "package": "@nrwl/cypress",
"name": "migrate-karma-config" "name": "update-cypress-if-v10"
}, },
{ {
"version": "14.6.0-beta.0",
"cli": "nx", "cli": "nx",
"version": "13.9.0-beta.4", "description": "Update jest configs to support jest 28 changes (https://jestjs.io/docs/upgrading-to-jest28#configuration-options)",
"description": "Set buildLibsFromSource property to false to not break existing usage.", "factory": "./src/migrations/update-14-6-0/update-configs-jest-28",
"factory": "./src/migrations/update-13-9-0/set-build-libs-from-source", "package": "@nrwl/jest",
"package": "@nrwl/angular", "name": "update-configs-jest-28"
"name": "set-build-libs-from-source"
}, },
{ {
"version": "13.4.4-beta.0", "version": "14.6.0-beta.0",
"cli": "nx", "cli": "nx",
"description": "Create a root babel config file if it doesn't exist and using babel-jest in jest.config.js and add @nrwl/web as needed", "description": "Update jest test files to support jest 28 changes (https://jestjs.io/docs/upgrading-to-jest28)",
"factory": "./src/migrations/update-13-4-4/add-missing-root-babel-config", "factory": "./src/migrations/update-14-6-0/update-tests-jest-28",
"package": "@nrwl/jest", "package": "@nrwl/jest",
"name": "add-missing-root-babel-config" "name": "update-tests-jest-28"
} }
] ]
} }

24
npm/ng-packs/nx.json

@ -14,31 +14,17 @@
"default": { "default": {
"runner": "nx/tasks-runners/default", "runner": "nx/tasks-runners/default",
"options": { "options": {
"cacheableOperations": [ "cacheableOperations": ["build", "lint", "test", "e2e"],
"build",
"lint",
"test",
"e2e"
],
"parallel": 3 "parallel": 3
} }
} }
}, },
"targetDependencies": {
"build": [
{
"target": "build",
"projects": "dependencies"
}
]
},
"workspaceLayout": { "workspaceLayout": {
"libsDir": "packages", "libsDir": "packages",
"appsDir": "" "appsDir": ""
}, },
"cli": { "cli": {
"analytics": false, "analytics": false
"defaultCollection": "@nrwl/angular"
}, },
"defaultProject": "dev-app", "defaultProject": "dev-app",
"generators": { "generators": {
@ -67,5 +53,11 @@
"@nrwl/angular:component": { "@nrwl/angular:component": {
"style": "scss" "style": "scss"
} }
},
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"targetDefaults": {
"build": {
"dependsOn": ["^build"]
}
} }
} }

95
npm/ng-packs/package.json

@ -15,7 +15,7 @@
"e2e": "ng e2e", "e2e": "ng e2e",
"affected:apps": "nx affected:apps", "affected:apps": "nx affected:apps",
"affected:libs": "nx affected:libs", "affected:libs": "nx affected:libs",
"affected:build": "nx affected:build", "affected:build": "nx affected:build --parallel 1",
"affected:e2e": "nx affected:e2e", "affected:e2e": "nx affected:e2e",
"affected:test": "nx affected:test", "affected:test": "nx affected:test",
"affected:lint": "nx affected:lint", "affected:lint": "nx affected:lint",
@ -28,7 +28,7 @@
"workspace-generator": "nx workspace-generator", "workspace-generator": "nx workspace-generator",
"dep-graph": "nx dep-graph", "dep-graph": "nx dep-graph",
"help": "nx help", "help": "nx help",
"compile:ivy": "yarn ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points --tsconfig './tsconfig.prod.json' --source node_modules", "compile:ivy": "yarn ngcc --properties es2020 browser module main --first-only --create-ivy-entry-points --tsconfig './tsconfig.prod.json' --source node_modules",
"postinstall": "node ./decorate-angular-cli.js && yarn compile:ivy", "postinstall": "node ./decorate-angular-cli.js && yarn compile:ivy",
"build:schematics": "cd scripts && yarn && yarn build:schematics && cd ..", "build:schematics": "cd scripts && yarn && yarn build:schematics && cd ..",
"dev:schematics": "tsc -p packages/schematics/tsconfig.json -w", "dev:schematics": "tsc -p packages/schematics/tsconfig.json -w",
@ -41,24 +41,24 @@
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"@abp/utils": "~6.0.0-rc.4", "@abp/utils": "~6.0.0-rc.4",
"@angular-devkit/build-angular": "13.3.5", "@angular-devkit/build-angular": "14.2.1",
"@angular-devkit/build-ng-packagr": "^0.1002.0", "@angular-devkit/build-ng-packagr": "^0.1002.0",
"@angular-devkit/schematics-cli": "~12.2.0", "@angular-devkit/schematics-cli": "~14.2.1",
"@angular-eslint/eslint-plugin": "13.0.1", "@angular-eslint/eslint-plugin": "14.0.3",
"@angular-eslint/eslint-plugin-template": "13.0.1", "@angular-eslint/eslint-plugin-template": "14.0.3",
"@angular-eslint/template-parser": "13.0.1", "@angular-eslint/template-parser": "14.0.3",
"@angular/animations": "13.3.6", "@angular/animations": "14.2.1",
"@angular/cli": "13.3.5", "@angular/cli": "~14.2.1",
"@angular/common": "13.3.6", "@angular/common": "14.2.1",
"@angular/compiler": "13.3.6", "@angular/compiler": "14.2.1",
"@angular/compiler-cli": "13.3.6", "@angular/compiler-cli": "14.2.1",
"@angular/core": "13.3.6", "@angular/core": "14.2.1",
"@angular/forms": "13.3.6", "@angular/forms": "14.2.1",
"@angular/language-service": "13.3.6", "@angular/language-service": "14.2.1",
"@angular/localize": "13.3.6", "@angular/localize": "14.2.1",
"@angular/platform-browser": "13.3.6", "@angular/platform-browser": "14.2.1",
"@angular/platform-browser-dynamic": "13.3.6", "@angular/platform-browser-dynamic": "14.2.1",
"@angular/router": "13.3.6", "@angular/router": "14.2.1",
"@abp/ng.account": "~6.0.0-rc.4", "@abp/ng.account": "~6.0.0-rc.4",
"@abp/ng.account.core": "~6.0.0-rc.4", "@abp/ng.account.core": "~6.0.0-rc.4",
"@abp/ng.core": "~6.0.0-rc.4", "@abp/ng.core": "~6.0.0-rc.4",
@ -71,58 +71,59 @@
"@abp/ng.theme.basic": "~6.0.0-rc.4", "@abp/ng.theme.basic": "~6.0.0-rc.4",
"@abp/ng.theme.shared": "~6.0.0-rc.4", "@abp/ng.theme.shared": "~6.0.0-rc.4",
"@fortawesome/fontawesome-free": "^5.15.4", "@fortawesome/fontawesome-free": "^5.15.4",
"@ng-bootstrap/ng-bootstrap": "~12.0.0-beta.4", "@ng-bootstrap/ng-bootstrap": "~13.0.0",
"@ngneat/spectator": "^10.0.0", "@ngneat/spectator": "^10.0.0",
"@ngx-validate/core": "^0.1.2", "@ngx-validate/core": "^0.1.2",
"@nrwl/angular": "13.10.3", "@nrwl/angular": "14.7.5",
"@nrwl/cli": "13.10.3", "@nrwl/cli": "14.7.5",
"@nrwl/cypress": "13.10.3", "@nrwl/cypress": "14.7.5",
"@nrwl/eslint-plugin-nx": "13.10.3", "@nrwl/eslint-plugin-nx": "14.7.5",
"@nrwl/jest": "13.10.3", "@nrwl/jest": "14.7.5",
"@nrwl/linter": "13.10.3", "@nrwl/linter": "14.7.5",
"@nrwl/workspace": "13.10.3", "@nrwl/workspace": "14.7.5",
"@schematics/angular": "~12.2.0", "@popperjs/core": "~2.11.2",
"@schematics/angular": "14.2.2",
"@swimlane/ngx-datatable": "^20.0.0", "@swimlane/ngx-datatable": "^20.0.0",
"@types/jest": "27.0.2", "@types/jest": "28.1.8",
"@types/node": "14.14.33", "@types/node": "14.14.33",
"@typescript-eslint/eslint-plugin": "5.18.0", "@typescript-eslint/eslint-plugin": "5.33.1",
"@typescript-eslint/parser": "5.18.0", "@typescript-eslint/parser": "5.33.1",
"angular-oauth2-oidc": "^13.0.1", "angular-oauth2-oidc": "^13.0.1",
"bootstrap": "^5.1.1", "bootstrap": "^5.1.1",
"chart.js": "^3.5.1", "chart.js": "^3.5.1",
"cypress": "^7.3.0", "cypress": "^7.3.0",
"dotenv": "10.0.0", "dotenv": "10.0.0",
"eslint": "8.12.0", "eslint": "8.15.0",
"eslint-config-prettier": "8.1.0", "eslint-config-prettier": "8.1.0",
"eslint-plugin-cypress": "^2.10.3", "eslint-plugin-cypress": "^2.10.3",
"got": "^11.5.2", "got": "^11.5.2",
"jest": "27.2.3", "jest": "28.1.3",
"jest-canvas-mock": "^2.3.1", "jest-canvas-mock": "^2.3.1",
"jest-preset-angular": "11.1.1", "jest-environment-jsdom": "28.1.1",
"jest-preset-angular": "12.2.2",
"jsonc-parser": "^2.3.0", "jsonc-parser": "^2.3.0",
"just-clone": "^3.2.1", "just-clone": "^3.2.1",
"just-compare": "^1.4.0", "just-compare": "^1.4.0",
"lerna": "^4.0.0", "lerna": "^4.0.0",
"ng-packagr": "13.3.1", "ng-packagr": "14.2.1",
"ng-zorro-antd": "^13.0.0", "ng-zorro-antd": "^14.0.0",
"@popperjs/core": "~2.11.2", "nx": "14.7.5",
"postcss": "^8.3.9", "postcss": "^8.3.9",
"postcss-import": "^14.0.2", "postcss-import": "14.1.0",
"postcss-preset-env": "^6.7.0", "postcss-preset-env": "7.5.0",
"postcss-url": "^10.1.1", "postcss-url": "10.1.3",
"prettier": "2.6.2", "prettier": "2.7.1",
"protractor": "~7.0.0", "protractor": "~7.0.0",
"rxjs": "~6.6.0", "rxjs": "7.5.6",
"should-quote": "^1.0.0", "should-quote": "^1.0.0",
"ts-jest": "27.0.5", "ts-jest": "28.0.8",
"ts-node": "~9.1.1", "ts-node": "10.9.1",
"ts-toolbelt": "6.15.4", "ts-toolbelt": "6.15.4",
"tsickle": "^0.39.1", "tsickle": "^0.39.1",
"tslib": "^2.0.0", "tslib": "^2.0.0",
"tslint": "~6.1.0", "tslint": "~6.1.0",
"typescript": "4.6.4", "typescript": "4.7.4",
"zone.js": "0.11.4", "zone.js": "0.11.4"
"nx": "13.10.3"
}, },
"dependencies": {} "dependencies": {}
} }

3
npm/ng-packs/packages/account-core/jest.config.js → npm/ng-packs/packages/account-core/jest.config.ts

@ -1,4 +1,5 @@
module.exports = { /* eslint-disable */
export default {
displayName: 'account-core', displayName: 'account-core',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],

5
npm/ng-packs/packages/account-core/tsconfig.json

@ -9,5 +9,8 @@
{ {
"path": "./tsconfig.spec.json" "path": "./tsconfig.spec.json"
} }
] ],
"compilerOptions": {
"target": "es2020"
}
} }

4
npm/ng-packs/packages/account-core/tsconfig.lib.json

@ -2,13 +2,13 @@
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../dist/out-tsc", "outDir": "../../dist/out-tsc",
"target": "es2015", "target": "es2020",
"declaration": true, "declaration": true,
"declarationMap": true, "declarationMap": true,
"inlineSources": true, "inlineSources": true,
"types": [], "types": [],
"lib": ["dom", "es2018"] "lib": ["dom", "es2018"]
}, },
"exclude": ["src/test-setup.ts", "**/*.spec.ts"], "exclude": ["src/test-setup.ts", "**/*.spec.ts", "jest.config.ts"],
"include": ["**/*.ts"] "include": ["**/*.ts"]
} }

2
npm/ng-packs/packages/account-core/tsconfig.spec.json

@ -7,5 +7,5 @@
"esModuleInterop": true "esModuleInterop": true
}, },
"files": ["src/test-setup.ts"], "files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"] "include": ["**/*.spec.ts", "**/*.d.ts", "jest.config.ts"]
} }

3
npm/ng-packs/packages/account/jest.config.js → npm/ng-packs/packages/account/jest.config.ts

@ -1,4 +1,5 @@
module.exports = { /* eslint-disable */
export default {
displayName: 'account', displayName: 'account',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],

8
npm/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts

@ -1,7 +1,7 @@
import { ProfileService } from '@abp/ng.account.core/proxy'; import { ProfileService } from '@abp/ng.account.core/proxy';
import { getPasswordValidators, ToasterService } from '@abp/ng.theme.shared'; import { getPasswordValidators, ToasterService } from '@abp/ng.theme.shared';
import { Component, Injector, OnInit } from '@angular/core'; import { Component, Injector, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { comparePasswords, Validation } from '@ngx-validate/core'; import { comparePasswords, Validation } from '@ngx-validate/core';
import { finalize } from 'rxjs/operators'; import { finalize } from 'rxjs/operators';
import { Account } from '../../models/account'; import { Account } from '../../models/account';
@ -19,7 +19,7 @@ const PASSWORD_FIELDS = ['newPassword', 'repeatNewPassword'];
export class ChangePasswordComponent export class ChangePasswordComponent
implements OnInit, Account.ChangePasswordComponentInputs, Account.ChangePasswordComponentOutputs implements OnInit, Account.ChangePasswordComponentInputs, Account.ChangePasswordComponentOutputs
{ {
form: FormGroup; form: UntypedFormGroup;
inProgress: boolean; inProgress: boolean;
@ -32,7 +32,7 @@ export class ChangePasswordComponent
}; };
constructor( constructor(
private fb: FormBuilder, private fb: UntypedFormBuilder,
private injector: Injector, private injector: Injector,
private toasterService: ToasterService, private toasterService: ToasterService,
private profileService: ProfileService, private profileService: ProfileService,
@ -86,7 +86,7 @@ export class ChangePasswordComponent
if (this.hideCurrentPassword) { if (this.hideCurrentPassword) {
this.hideCurrentPassword = false; this.hideCurrentPassword = false;
this.form.addControl('password', new FormControl('', [required])); this.form.addControl('password', new UntypedFormControl('', [required]));
} }
}, },
error: err => { error: err => {

6
npm/ng-packs/packages/account/src/lib/components/forgot-password/forgot-password.component.ts

@ -1,6 +1,6 @@
import { AccountService } from '@abp/ng.account.core/proxy'; import { AccountService } from '@abp/ng.account.core/proxy';
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
import { finalize } from 'rxjs/operators'; import { finalize } from 'rxjs/operators';
@Component({ @Component({
@ -8,13 +8,13 @@ import { finalize } from 'rxjs/operators';
templateUrl: 'forgot-password.component.html', templateUrl: 'forgot-password.component.html',
}) })
export class ForgotPasswordComponent { export class ForgotPasswordComponent {
form: FormGroup; form: UntypedFormGroup;
inProgress: boolean; inProgress: boolean;
isEmailSent = false; isEmailSent = false;
constructor(private fb: FormBuilder, private accountService: AccountService) { constructor(private fb: UntypedFormBuilder, private accountService: AccountService) {
this.form = this.fb.group({ this.form = this.fb.group({
email: ['', [Validators.required, Validators.email]], email: ['', [Validators.required, Validators.email]],
}); });

6
npm/ng-packs/packages/account/src/lib/components/login/login.component.ts

@ -1,7 +1,7 @@
import { AuthService, ConfigStateService } from '@abp/ng.core'; import { AuthService, ConfigStateService } from '@abp/ng.core';
import { ToasterService } from '@abp/ng.theme.shared'; import { ToasterService } from '@abp/ng.theme.shared';
import { Component, Injector, OnInit } from '@angular/core'; import { Component, Injector, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
import { throwError } from 'rxjs'; import { throwError } from 'rxjs';
import { catchError, finalize } from 'rxjs/operators'; import { catchError, finalize } from 'rxjs/operators';
import { eAccountComponents } from '../../enums/components'; import { eAccountComponents } from '../../enums/components';
@ -14,7 +14,7 @@ const { maxLength, required } = Validators;
templateUrl: './login.component.html', templateUrl: './login.component.html',
}) })
export class LoginComponent implements OnInit { export class LoginComponent implements OnInit {
form: FormGroup; form: UntypedFormGroup;
inProgress: boolean; inProgress: boolean;
@ -24,7 +24,7 @@ export class LoginComponent implements OnInit {
constructor( constructor(
protected injector: Injector, protected injector: Injector,
protected fb: FormBuilder, protected fb: UntypedFormBuilder,
protected toasterService: ToasterService, protected toasterService: ToasterService,
protected authService: AuthService, protected authService: AuthService,
protected configState: ConfigStateService, protected configState: ConfigStateService,

4
npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings-half-row.component.ts

@ -4,7 +4,7 @@ import {
FormProp, FormProp,
EXTENSIBLE_FORM_VIEW_PROVIDER, EXTENSIBLE_FORM_VIEW_PROVIDER,
} from '@abp/ng.theme.shared/extensions'; } from '@abp/ng.theme.shared/extensions';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
@Component({ @Component({
selector: 'abp-personal-settings-half-row', selector: 'abp-personal-settings-half-row',
@ -27,7 +27,7 @@ export class PersonalSettingsHalfRowComponent {
public displayName: string; public displayName: string;
public name: string; public name: string;
public id: string; public id: string;
public formGroup: FormGroup; public formGroup: UntypedFormGroup;
constructor(@Inject(EXTENSIONS_FORM_PROP) private propData: FormProp) { constructor(@Inject(EXTENSIONS_FORM_PROP) private propData: FormProp) {
this.displayName = propData.displayName; this.displayName = propData.displayName;

6
npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts

@ -1,7 +1,7 @@
import { ProfileDto, ProfileService } from '@abp/ng.account.core/proxy'; import { ProfileDto, ProfileService } from '@abp/ng.account.core/proxy';
import { ToasterService } from '@abp/ng.theme.shared'; import { ToasterService } from '@abp/ng.theme.shared';
import { Component, Injector, OnInit, ViewEncapsulation } from '@angular/core'; import { Component, Injector, OnInit, ViewEncapsulation } from '@angular/core';
import { FormBuilder, FormGroup } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
import { finalize } from 'rxjs/operators'; import { finalize } from 'rxjs/operators';
import { Account } from '../../models/account'; import { Account } from '../../models/account';
import { ManageProfileStateService } from '../../services/manage-profile.state.service'; import { ManageProfileStateService } from '../../services/manage-profile.state.service';
@ -31,12 +31,12 @@ export class PersonalSettingsComponent
{ {
selected: ProfileDto; selected: ProfileDto;
form: FormGroup; form: UntypedFormGroup;
inProgress: boolean; inProgress: boolean;
constructor( constructor(
private fb: FormBuilder, private fb: UntypedFormBuilder,
private toasterService: ToasterService, private toasterService: ToasterService,
private profileService: ProfileService, private profileService: ProfileService,
private manageProfileState: ManageProfileStateService, private manageProfileState: ManageProfileStateService,

6
npm/ng-packs/packages/account/src/lib/components/register/register.component.ts

@ -2,7 +2,7 @@ import { AccountService, RegisterDto } from '@abp/ng.account.core/proxy';
import { AuthService, ConfigStateService } from '@abp/ng.core'; import { AuthService, ConfigStateService } from '@abp/ng.core';
import { getPasswordValidators, ToasterService } from '@abp/ng.theme.shared'; import { getPasswordValidators, ToasterService } from '@abp/ng.theme.shared';
import { Component, Injector, OnInit } from '@angular/core'; import { Component, Injector, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
import { throwError } from 'rxjs'; import { throwError } from 'rxjs';
import { catchError, finalize, switchMap } from 'rxjs/operators'; import { catchError, finalize, switchMap } from 'rxjs/operators';
import { eAccountComponents } from '../../enums/components'; import { eAccountComponents } from '../../enums/components';
@ -15,7 +15,7 @@ const { maxLength, required, email } = Validators;
templateUrl: './register.component.html', templateUrl: './register.component.html',
}) })
export class RegisterComponent implements OnInit { export class RegisterComponent implements OnInit {
form: FormGroup; form: UntypedFormGroup;
inProgress: boolean; inProgress: boolean;
@ -24,7 +24,7 @@ export class RegisterComponent implements OnInit {
authWrapperKey = eAccountComponents.AuthWrapper; authWrapperKey = eAccountComponents.AuthWrapper;
constructor( constructor(
protected fb: FormBuilder, protected fb: UntypedFormBuilder,
protected accountService: AccountService, protected accountService: AccountService,
protected configState: ConfigStateService, protected configState: ConfigStateService,
protected toasterService: ToasterService, protected toasterService: ToasterService,

6
npm/ng-packs/packages/account/src/lib/components/reset-password/reset-password.component.ts

@ -1,7 +1,7 @@
import { AccountService } from '@abp/ng.account.core/proxy'; import { AccountService } from '@abp/ng.account.core/proxy';
import { getPasswordValidators } from '@abp/ng.theme.shared'; import { getPasswordValidators } from '@abp/ng.theme.shared';
import { Component, Injector, OnInit } from '@angular/core'; import { Component, Injector, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { comparePasswords, Validation } from '@ngx-validate/core'; import { comparePasswords, Validation } from '@ngx-validate/core';
import { finalize } from 'rxjs/operators'; import { finalize } from 'rxjs/operators';
@ -13,7 +13,7 @@ const PASSWORD_FIELDS = ['password', 'confirmPassword'];
templateUrl: './reset-password.component.html', templateUrl: './reset-password.component.html',
}) })
export class ResetPasswordComponent implements OnInit { export class ResetPasswordComponent implements OnInit {
form: FormGroup; form: UntypedFormGroup;
inProgress = false; inProgress = false;
@ -26,7 +26,7 @@ export class ResetPasswordComponent implements OnInit {
}; };
constructor( constructor(
private fb: FormBuilder, private fb: UntypedFormBuilder,
private accountService: AccountService, private accountService: AccountService,
private route: ActivatedRoute, private route: ActivatedRoute,
private router: Router, private router: Router,

5
npm/ng-packs/packages/account/tsconfig.json

@ -9,5 +9,8 @@
{ {
"path": "./tsconfig.spec.json" "path": "./tsconfig.spec.json"
} }
] ],
"compilerOptions": {
"target": "es2020"
}
} }

4
npm/ng-packs/packages/account/tsconfig.lib.json

@ -2,13 +2,13 @@
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../dist/out-tsc", "outDir": "../../dist/out-tsc",
"target": "es2015", "target": "es2020",
"declaration": true, "declaration": true,
"declarationMap": true, "declarationMap": true,
"inlineSources": true, "inlineSources": true,
"types": [], "types": [],
"lib": ["dom", "es2018"] "lib": ["dom", "es2018"]
}, },
"exclude": ["src/test-setup.ts", "**/*.spec.ts"], "exclude": ["src/test-setup.ts", "**/*.spec.ts", "jest.config.ts"],
"include": ["**/*.ts"] "include": ["**/*.ts"]
} }

2
npm/ng-packs/packages/account/tsconfig.spec.json

@ -7,5 +7,5 @@
"esModuleInterop": true "esModuleInterop": true
}, },
"files": ["src/test-setup.ts"], "files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"] "include": ["**/*.spec.ts", "**/*.d.ts", "jest.config.ts"]
} }

3
npm/ng-packs/packages/components/jest.config.js → npm/ng-packs/packages/components/jest.config.ts

@ -1,4 +1,5 @@
module.exports = { /* eslint-disable */
export default {
displayName: 'components', displayName: 'components',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],

2
npm/ng-packs/packages/components/package.json

@ -13,7 +13,7 @@
}, },
"dependencies": { "dependencies": {
"chart.js": "^3.5.1", "chart.js": "^3.5.1",
"ng-zorro-antd": "^13.0.0", "ng-zorro-antd": "^14.0.0",
"tslib": "^2.0.0" "tslib": "^2.0.0"
}, },
"publishConfig": { "publishConfig": {

5
npm/ng-packs/packages/components/tsconfig.json

@ -9,5 +9,8 @@
{ {
"path": "./tsconfig.spec.json" "path": "./tsconfig.spec.json"
} }
] ],
"compilerOptions": {
"target": "es2020"
}
} }

4
npm/ng-packs/packages/components/tsconfig.lib.json

@ -2,13 +2,13 @@
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../dist/out-tsc", "outDir": "../../dist/out-tsc",
"target": "es2015", "target": "es2020",
"declaration": true, "declaration": true,
"declarationMap": true, "declarationMap": true,
"inlineSources": true, "inlineSources": true,
"types": [], "types": [],
"lib": ["dom", "es2018"] "lib": ["dom", "es2018"]
}, },
"exclude": ["src/test-setup.ts", "**/*.spec.ts"], "exclude": ["src/test-setup.ts", "**/*.spec.ts", "jest.config.ts"],
"include": ["**/*.ts"] "include": ["**/*.ts"]
} }

2
npm/ng-packs/packages/components/tsconfig.spec.json

@ -7,5 +7,5 @@
"esModuleInterop": true "esModuleInterop": true
}, },
"files": ["src/test-setup.ts"], "files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"] "include": ["**/*.spec.ts", "**/*.d.ts", "jest.config.ts"]
} }

3
npm/ng-packs/packages/core/jest.config.js → npm/ng-packs/packages/core/jest.config.ts

@ -1,4 +1,5 @@
module.exports = { /* eslint-disable */
export default {
displayName: 'core', displayName: 'core',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],

45
npm/ng-packs/packages/core/src/lib/directives/ellipsis.directive.ts

@ -1,45 +0,0 @@
import {
AfterViewInit,
ChangeDetectorRef,
Directive,
ElementRef,
HostBinding,
Input,
} from '@angular/core';
@Directive({
selector: '[abpEllipsis]',
})
export class EllipsisDirective implements AfterViewInit {
@Input('abpEllipsis')
width: string;
@HostBinding('title')
@Input()
title: string;
@Input('abpEllipsisEnabled')
enabled = true;
@HostBinding('class.abp-ellipsis-inline')
get inlineClass() {
return this.enabled && this.width;
}
@HostBinding('class.abp-ellipsis')
get class() {
return this.enabled && !this.width;
}
@HostBinding('style.max-width')
get maxWidth() {
return this.enabled && this.width ? this.width || '170px' : undefined;
}
constructor(private cdRef: ChangeDetectorRef, private elRef: ElementRef) {}
ngAfterViewInit() {
this.title = this.title || (this.elRef.nativeElement as HTMLElement).innerText;
this.cdRef.detectChanges();
}
}

8
npm/ng-packs/packages/core/src/lib/directives/form-submit.directive.ts

@ -8,12 +8,12 @@ import {
Output, Output,
Self, Self,
} from '@angular/core'; } from '@angular/core';
import { FormControl, FormGroup, FormGroupDirective } from '@angular/forms'; import { UntypedFormControl, UntypedFormGroup, FormGroupDirective } from '@angular/forms';
import { fromEvent } from 'rxjs'; import { fromEvent } from 'rxjs';
import { debounceTime, filter } from 'rxjs/operators'; import { debounceTime, filter } from 'rxjs/operators';
import { SubscriptionService } from '../services/subscription.service'; import { SubscriptionService } from '../services/subscription.service';
type Controls = { [key: string]: FormControl } | FormGroup[]; type Controls = { [key: string]: UntypedFormControl } | UntypedFormGroup[];
/** /**
* @deprecated FormSubmitDirective will be removed in V7.0.0. Use `ngSubmit` instead. * @deprecated FormSubmitDirective will be removed in V7.0.0. Use `ngSubmit` instead.
*/ */
@ -73,7 +73,7 @@ export class FormSubmitDirective implements OnInit {
markAsDirty() { markAsDirty() {
const { form } = this.formGroupDirective; const { form } = this.formGroupDirective;
setDirty(form.controls as { [key: string]: FormControl }); setDirty(form.controls as { [key: string]: UntypedFormControl });
form.markAsDirty(); form.markAsDirty();
this.cdRef.detectChanges(); this.cdRef.detectChanges();
@ -83,7 +83,7 @@ export class FormSubmitDirective implements OnInit {
function setDirty(controls: Controls) { function setDirty(controls: Controls) {
if (Array.isArray(controls)) { if (Array.isArray(controls)) {
controls.forEach(group => { controls.forEach(group => {
setDirty(group.controls as { [key: string]: FormControl }); setDirty(group.controls as { [key: string]: UntypedFormControl });
}); });
return; return;
} }

2
npm/ng-packs/packages/core/src/lib/directives/permission.directive.ts

@ -23,7 +23,7 @@ export class PermissionDirective implements OnDestroy, OnChanges, AfterViewInit
subscription!: Subscription; subscription!: Subscription;
cdrSubject = new ReplaySubject(); cdrSubject = new ReplaySubject<void>();
rendered = false; rendered = false;

5
npm/ng-packs/packages/core/src/lib/handlers/routes.handler.ts

@ -1,5 +1,5 @@
import { Injectable, Optional } from '@angular/core'; import { Injectable, Optional } from '@angular/core';
import { Router } from '@angular/router'; import { Route, Router } from '@angular/router';
import { ABP } from '../models'; import { ABP } from '../models';
import { RoutesService } from '../services/routes.service'; import { RoutesService } from '../services/routes.service';
@ -12,7 +12,7 @@ export class RoutesHandler {
} }
addRoutes() { addRoutes() {
this.router?.config?.forEach(({ path = '', data }) => { this.router?.config?.forEach(({ path = '', data }: RouteData) => {
if (!data?.routes) return; if (!data?.routes) return;
if (Array.isArray(data.routes)) { if (Array.isArray(data.routes)) {
@ -43,3 +43,4 @@ function flatRoutes(routes: RouteDef[], parent: any) {
} }
type RouteDef = ABP.Route & { children: RouteDef[] }; type RouteDef = ABP.Route & { children: RouteDef[] };
type RouteData = Route & { data: { routes: RouteDef | Array<RouteDef> } };

17
npm/ng-packs/packages/core/src/lib/services/config-state.service.ts

@ -2,7 +2,10 @@ import { Injectable } from '@angular/core';
import { Observable, Subject } from 'rxjs'; import { Observable, Subject } from 'rxjs';
import { map, switchMap, take } from 'rxjs/operators'; import { map, switchMap, take } from 'rxjs/operators';
import { AbpApplicationConfigurationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service'; import { AbpApplicationConfigurationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service';
import { ApplicationConfigurationDto, ApplicationGlobalFeatureConfigurationDto } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/models'; import {
ApplicationConfigurationDto,
ApplicationGlobalFeatureConfigurationDto,
} from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/models';
import { InternalStore } from '../utils/internal-store-utils'; import { InternalStore } from '../utils/internal-store-utils';
@Injectable({ @Injectable({
@ -15,7 +18,7 @@ export class ConfigStateService {
return this.store.sliceUpdate; return this.store.sliceUpdate;
} }
private updateSubject = new Subject(); private updateSubject = new Subject<void>();
constructor(private abpConfigService: AbpApplicationConfigurationService) { constructor(private abpConfigService: AbpApplicationConfigurationService) {
this.initUpdateStream(); this.initUpdateStream();
@ -147,8 +150,11 @@ export class ConfigStateService {
return this.store.sliceState(state => state.globalFeatures); return this.store.sliceState(state => state.globalFeatures);
} }
private isGlobalFeatureEnabled(key: string, globalFeatures: ApplicationGlobalFeatureConfigurationDto) { private isGlobalFeatureEnabled(
const features = globalFeatures.enabledFeatures || [] key: string,
globalFeatures: ApplicationGlobalFeatureConfigurationDto,
) {
const features = globalFeatures.enabledFeatures || [];
return features.some(f => key === f); return features.some(f => key === f);
} }
@ -159,9 +165,6 @@ export class ConfigStateService {
getGlobalFeatureIsEnabled$(key: string) { getGlobalFeatureIsEnabled$(key: string) {
return this.store.sliceState(state => this.isGlobalFeatureEnabled(key, state.globalFeatures)); return this.store.sliceState(state => this.isGlobalFeatureEnabled(key, state.globalFeatures));
} }
} }
function splitKeys(keys: string[] | string): string[] { function splitKeys(keys: string[] | string): string[] {

2
npm/ng-packs/packages/core/src/lib/services/http-wait.service.ts

@ -24,7 +24,7 @@ export class HttpWaitService {
}); });
private delay: number; private delay: number;
private destroy$ = new Subject(); private destroy$ = new Subject<void>();
constructor(injector: Injector) { constructor(injector: Injector) {
this.delay = injector.get(LOADER_DELAY, 500); this.delay = injector.get(LOADER_DELAY, 500);

2
npm/ng-packs/packages/core/src/lib/services/list.service.ts

@ -80,7 +80,7 @@ export class ListService<QueryParamsType = ABP.PageQueryParams | any> implements
private _isLoading$ = new BehaviorSubject(false); private _isLoading$ = new BehaviorSubject(false);
private destroy$ = new Subject(); private destroy$ = new Subject<void>();
private delay: MonoTypeOperatorFunction<QueryParamsType>; private delay: MonoTypeOperatorFunction<QueryParamsType>;

2
npm/ng-packs/packages/core/src/lib/services/router-wait.service.ts

@ -15,7 +15,7 @@ export interface RouterWaitState {
}) })
export class RouterWaitService { export class RouterWaitService {
private store = new InternalStore<RouterWaitState>({ loading: false }); private store = new InternalStore<RouterWaitState>({ loading: false });
private destroy$ = new Subject(); private destroy$ = new Subject<void>();
private delay: number; private delay: number;
constructor(private routerEvents: RouterEvents, injector: Injector) { constructor(private routerEvents: RouterEvents, injector: Injector) {
this.delay = injector.get(LOADER_DELAY, 500); this.delay = injector.get(LOADER_DELAY, 500);

9
npm/ng-packs/packages/core/src/lib/tests/api.interceptor.spec.ts

@ -3,8 +3,9 @@ import { SpyObject } from '@ngneat/spectator';
import { createServiceFactory, SpectatorService } from '@ngneat/spectator/jest'; import { createServiceFactory, SpectatorService } from '@ngneat/spectator/jest';
import { OAuthService } from 'angular-oauth2-oidc'; import { OAuthService } from 'angular-oauth2-oidc';
import { Subject, timer } from 'rxjs'; import { Subject, timer } from 'rxjs';
import { ApiInterceptor } from '../interceptors'; import { ApiInterceptor } from '../interceptors/api.interceptor';
import { HttpWaitService, SessionStateService } from '../services'; import { HttpWaitService } from '../services/http-wait.service';
import { SessionStateService } from '../services/session-state.service';
import { TENANT_KEY } from '../tokens/tenant-key.token'; import { TENANT_KEY } from '../tokens/tenant-key.token';
describe('ApiInterceptor', () => { describe('ApiInterceptor', () => {
@ -36,7 +37,7 @@ describe('ApiInterceptor', () => {
sessionState.getTenant.andReturn({ id: 'Volosoft', name: 'Volosoft' }); sessionState.getTenant.andReturn({ id: 'Volosoft', name: 'Volosoft' });
const request = new HttpRequest('GET', 'https://abp.io'); const request = new HttpRequest('GET', 'https://abp.io');
const handleRes$ = new Subject(); const handleRes$ = new Subject<void>();
const handler = { const handler = {
handle: (req: HttpRequest<any>) => { handle: (req: HttpRequest<any>) => {
@ -59,7 +60,7 @@ describe('ApiInterceptor', () => {
const spyDeleteRequest = jest.spyOn(httpWaitService, 'deleteRequest'); const spyDeleteRequest = jest.spyOn(httpWaitService, 'deleteRequest');
const request = new HttpRequest('GET', 'https://abp.io'); const request = new HttpRequest('GET', 'https://abp.io');
const handleRes$ = new Subject(); const handleRes$ = new Subject<void>();
const handler = { const handler = {
handle: (req: HttpRequest<any>) => { handle: (req: HttpRequest<any>) => {

2
npm/ng-packs/packages/core/src/lib/tests/container.strategy.spec.ts

@ -3,7 +3,7 @@ import {
ClearContainerStrategy, ClearContainerStrategy,
CONTAINER_STRATEGY, CONTAINER_STRATEGY,
InsertIntoContainerStrategy, InsertIntoContainerStrategy,
} from '../strategies'; } from '../strategies/container.strategy';
describe('ClearContainerStrategy', () => { describe('ClearContainerStrategy', () => {
const containerRef = { const containerRef = {

2
npm/ng-packs/packages/core/src/lib/tests/dom.strategy.spec.ts

@ -1,4 +1,4 @@
import { DomStrategy, DOM_STRATEGY } from '../strategies'; import { DOM_STRATEGY, DomStrategy } from '../strategies/dom.strategy';
describe('DomStrategy', () => { describe('DomStrategy', () => {
describe('#insertElement', () => { describe('#insertElement', () => {

2
npm/ng-packs/packages/core/src/lib/tests/environment-utils.spec.ts

@ -3,7 +3,7 @@ import { Component, Injector } from '@angular/core';
import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; import { createComponentFactory, Spectator } from '@ngneat/spectator/jest';
import { BehaviorSubject } from 'rxjs'; import { BehaviorSubject } from 'rxjs';
import { Environment, RemoteEnv } from '../models/environment'; import { Environment, RemoteEnv } from '../models/environment';
import { EnvironmentService } from '../services'; import { EnvironmentService } from '../services/environment.service';
import { getRemoteEnv } from '../utils/environment-utils'; import { getRemoteEnv } from '../utils/environment-utils';
import { deepMerge } from '../utils/object-utils'; import { deepMerge } from '../utils/object-utils';

36
npm/ng-packs/packages/core/src/lib/tests/environment.service.spec.ts

@ -1,7 +1,7 @@
import { waitForAsync } from '@angular/core/testing'; import { waitForAsync } from '@angular/core/testing';
import { createServiceFactory, SpectatorService } from '@ngneat/spectator/jest'; import { createServiceFactory, SpectatorService } from '@ngneat/spectator/jest';
import { Environment } from '../models'; import { Environment } from '../models/environment';
import { EnvironmentService } from '../services'; import { EnvironmentService } from '../services/environment.service';
export const ENVIRONMENT_DATA = { export const ENVIRONMENT_DATA = {
production: false, production: false,
@ -41,27 +41,21 @@ describe('Environment', () => {
}); });
describe('#getEnvironment', () => { describe('#getEnvironment', () => {
it( it('should return ENVIRONMENT_DATA', waitForAsync(() => {
'should return ENVIRONMENT_DATA', expect(environment.getEnvironment()).toEqual(ENVIRONMENT_DATA);
waitForAsync(() => { environment.getEnvironment$().subscribe(data => expect(data).toEqual(ENVIRONMENT_DATA));
expect(environment.getEnvironment()).toEqual(ENVIRONMENT_DATA); }));
environment.getEnvironment$().subscribe(data => expect(data).toEqual(ENVIRONMENT_DATA));
}),
);
}); });
describe('#getApiUrl', () => { describe('#getApiUrl', () => {
it( it('should return api url', waitForAsync(() => {
'should return api url', expect(environment.getApiUrl('default')).toEqual(ENVIRONMENT_DATA.apis.default.url);
waitForAsync(() => { environment
expect(environment.getApiUrl('default')).toEqual(ENVIRONMENT_DATA.apis.default.url); .getApiUrl$('other')
environment .subscribe(data => expect(data).toEqual(ENVIRONMENT_DATA.apis.other.url));
.getApiUrl$('other') environment
.subscribe(data => expect(data).toEqual(ENVIRONMENT_DATA.apis.other.url)); .getApiUrl$('yetAnother')
environment .subscribe(data => expect(data).toEqual(ENVIRONMENT_DATA.apis.default.url));
.getApiUrl$('yetAnother') }));
.subscribe(data => expect(data).toEqual(ENVIRONMENT_DATA.apis.default.url));
}),
);
}); });
}); });

2
npm/ng-packs/packages/core/src/lib/tests/generator-utils.spec.ts

@ -1,4 +1,4 @@
import { generateHash, generatePassword } from '../utils'; import { generateHash, generatePassword } from '../utils/generator-utils';
describe('GeneratorUtils', () => { describe('GeneratorUtils', () => {
describe('#generateHash', () => { describe('#generateHash', () => {

12
npm/ng-packs/packages/core/src/lib/tests/initial-utils.spec.ts

@ -4,15 +4,13 @@ import { OAuthService } from 'angular-oauth2-oidc';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { AbpApplicationConfigurationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service'; import { AbpApplicationConfigurationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service';
import { ApplicationConfigurationDto } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/models'; import { ApplicationConfigurationDto } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/models';
import { import { SessionStateService } from '../services/session-state.service';
AuthService, import { EnvironmentService } from '../services/environment.service';
ConfigStateService, import { AuthService } from '../services/auth.service';
EnvironmentService, import { ConfigStateService } from '../services/config-state.service';
SessionStateService,
} from '../services';
import * as AuthFlowStrategy from '../strategies/auth-flow.strategy'; import * as AuthFlowStrategy from '../strategies/auth-flow.strategy';
import { CORE_OPTIONS } from '../tokens/options.token'; import { CORE_OPTIONS } from '../tokens/options.token';
import { checkAccessToken, getInitialData, localeInitializer } from '../utils'; import { checkAccessToken, getInitialData, localeInitializer } from '../utils/initial-utils';
import * as environmentUtils from '../utils/environment-utils'; import * as environmentUtils from '../utils/environment-utils';
import * as multiTenancyUtils from '../utils/multi-tenancy-utils'; import * as multiTenancyUtils from '../utils/multi-tenancy-utils';

4
npm/ng-packs/packages/core/src/lib/tests/internal-store.spec.ts

@ -1,7 +1,7 @@
import clone from 'just-clone'; import clone from 'just-clone';
import { take } from 'rxjs/operators'; import { take } from 'rxjs/operators';
import { DeepPartial } from '../models'; import { DeepPartial } from '../models/utility';
import { InternalStore } from '../utils'; import { InternalStore } from '../utils/internal-store-utils';
const mockInitialState = { const mockInitialState = {
foo: { foo: {

6
npm/ng-packs/packages/core/src/lib/tests/lazy-load-utils.spec.ts

@ -1,6 +1,6 @@
import { DomStrategy, DOM_STRATEGY } from '../strategies'; import { DOM_STRATEGY, DomStrategy } from '../strategies';
import { CrossOriginStrategy, CROSS_ORIGIN_STRATEGY } from '../strategies/cross-origin.strategy'; import { CROSS_ORIGIN_STRATEGY, CrossOriginStrategy } from '../strategies/cross-origin.strategy';
import { uuid } from '../utils'; import { uuid } from '../utils/generator-utils';
import { fromLazyLoad } from '../utils/lazy-load-utils'; import { fromLazyLoad } from '../utils/lazy-load-utils';
describe('Lazy Load Utils', () => { describe('Lazy Load Utils', () => {

4
npm/ng-packs/packages/core/src/lib/tests/lazy-load.service.spec.ts

@ -1,8 +1,8 @@
import { of, throwError } from 'rxjs'; import { of, throwError } from 'rxjs';
import { switchMap } from 'rxjs/operators'; import { switchMap } from 'rxjs/operators';
import { LazyLoadService } from '../services/lazy-load.service'; import { LazyLoadService } from '../services/lazy-load.service';
import { ScriptLoadingStrategy } from '../strategies'; import { ScriptLoadingStrategy } from '../strategies/loading.strategy';
import { ResourceWaitService } from '../services'; import { ResourceWaitService } from '../services/resource-wait.service';
describe('LazyLoadService', () => { describe('LazyLoadService', () => {
describe('#load', () => { describe('#load', () => {

6
npm/ng-packs/packages/core/src/lib/tests/loading.strategy.spec.ts

@ -1,10 +1,10 @@
import { CROSS_ORIGIN_STRATEGY } from '../strategies/cross-origin.strategy';
import { import {
CROSS_ORIGIN_STRATEGY,
DOM_STRATEGY,
LOADING_STRATEGY, LOADING_STRATEGY,
ScriptLoadingStrategy, ScriptLoadingStrategy,
StyleLoadingStrategy, StyleLoadingStrategy,
} from '../strategies'; } from '../strategies/loading.strategy';
import { DOM_STRATEGY } from '../strategies/dom.strategy';
const path = 'http://example.com/'; const path = 'http://example.com/';

4
npm/ng-packs/packages/core/src/lib/tests/locale.provider.spec.ts

@ -1,8 +1,8 @@
import { Component, LOCALE_ID } from '@angular/core'; import { Component, LOCALE_ID } from '@angular/core';
import { createRoutingFactory, SpectatorRouting } from '@ngneat/spectator/jest'; import { createRoutingFactory, SpectatorRouting } from '@ngneat/spectator/jest';
import { differentLocales } from '../constants/different-locales'; import { differentLocales } from '../constants/different-locales';
import { LocaleId } from '../providers'; import { LocaleId } from '../providers/locale.provider';
import { LocalizationService } from '../services'; import { LocalizationService } from '../services/localization.service';
@Component({ selector: 'abp-dummy', template: '' }) @Component({ selector: 'abp-dummy', template: '' })
export class DummyComponent {} export class DummyComponent {}

4
npm/ng-packs/packages/core/src/lib/tests/localization.pipe.spec.ts

@ -1,6 +1,6 @@
import { createServiceFactory, SpectatorService, SpyObject } from '@ngneat/spectator/jest'; import { createServiceFactory, SpectatorService, SpyObject } from '@ngneat/spectator/jest';
import { LocalizationPipe } from '../pipes'; import { LocalizationPipe } from '../pipes/localization.pipe';
import { LocalizationService } from '../services'; import { LocalizationService } from '../services/localization.service';
describe('LocalizationPipe', () => { describe('LocalizationPipe', () => {
let spectator: SpectatorService<LocalizationPipe>; let spectator: SpectatorService<LocalizationPipe>;

3
npm/ng-packs/packages/core/src/lib/tests/localization.service.spec.ts

@ -3,7 +3,8 @@ import { Router } from '@angular/router';
import { createServiceFactory, SpectatorService, SpyObject } from '@ngneat/spectator/jest'; import { createServiceFactory, SpectatorService, SpyObject } from '@ngneat/spectator/jest';
import { BehaviorSubject } from 'rxjs'; import { BehaviorSubject } from 'rxjs';
import { AbpApplicationConfigurationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service'; import { AbpApplicationConfigurationService } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service';
import { ConfigStateService, SessionStateService } from '../services'; import { ConfigStateService } from '../services/config-state.service';
import { SessionStateService } from '../services/session-state.service';
import { LocalizationService } from '../services/localization.service'; import { LocalizationService } from '../services/localization.service';
import { CORE_OPTIONS } from '../tokens/options.token'; import { CORE_OPTIONS } from '../tokens/options.token';
import { CONFIG_STATE_DATA } from './config-state.service.spec'; import { CONFIG_STATE_DATA } from './config-state.service.spec';

2
npm/ng-packs/packages/core/src/lib/tests/permission.directive.spec.ts

@ -1,7 +1,7 @@
import { createDirectiveFactory, SpectatorDirective } from '@ngneat/spectator/jest'; import { createDirectiveFactory, SpectatorDirective } from '@ngneat/spectator/jest';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import { PermissionDirective } from '../directives/permission.directive'; import { PermissionDirective } from '../directives/permission.directive';
import { PermissionService } from '../services'; import { PermissionService } from '../services/permission.service';
import { ChangeDetectorRef } from '@angular/core'; import { ChangeDetectorRef } from '@angular/core';
describe('PermissionDirective', () => { describe('PermissionDirective', () => {

5
npm/ng-packs/packages/core/src/lib/tests/permission.guard.spec.ts

@ -5,9 +5,10 @@ import { RouterModule } from '@angular/router';
import { createServiceFactory, SpectatorService, SpyObject } from '@ngneat/spectator/jest'; import { createServiceFactory, SpectatorService, SpyObject } from '@ngneat/spectator/jest';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { PermissionGuard } from '../guards/permission.guard'; import { PermissionGuard } from '../guards/permission.guard';
import { HttpErrorReporterService, PermissionService } from '../services'; import { HttpErrorReporterService } from '../services/http-error-reporter.service';
import { PermissionService } from '../services/permission.service';
import { RoutesService } from '../services/routes.service'; import { RoutesService } from '../services/routes.service';
import { CORE_OPTIONS } from '../tokens'; import { CORE_OPTIONS } from '../tokens/options.token';
describe('PermissionGuard', () => { describe('PermissionGuard', () => {
let spectator: SpectatorService<PermissionGuard>; let spectator: SpectatorService<PermissionGuard>;

18
npm/ng-packs/packages/core/src/lib/tests/projection.strategy.spec.ts

@ -1,15 +1,21 @@
import { Component, ComponentRef, EmbeddedViewRef, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core'; import {
Component,
ComponentRef,
EmbeddedViewRef,
TemplateRef,
ViewChild,
ViewContainerRef,
} from '@angular/core';
import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; import { createComponentFactory, Spectator } from '@ngneat/spectator/jest';
import { import {
ComponentProjectionStrategy, ComponentProjectionStrategy,
CONTAINER_STRATEGY,
ContainerStrategy,
CONTEXT_STRATEGY,
DOM_STRATEGY,
PROJECTION_STRATEGY, PROJECTION_STRATEGY,
RootComponentProjectionStrategy, RootComponentProjectionStrategy,
TemplateProjectionStrategy, TemplateProjectionStrategy,
} from '../strategies'; } from '../strategies/projection.strategy';
import { CONTAINER_STRATEGY, ContainerStrategy } from '../strategies/container.strategy';
import { DOM_STRATEGY } from '../strategies/dom.strategy';
import { CONTEXT_STRATEGY } from '../strategies/context.strategy';
describe('ComponentProjectionStrategy', () => { describe('ComponentProjectionStrategy', () => {
@Component({ @Component({

4
npm/ng-packs/packages/core/src/lib/tests/replaceable-template.directive.spec.ts

@ -2,8 +2,8 @@ import { Component, EventEmitter, Inject, Input, Optional, Output } from '@angul
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { createDirectiveFactory, SpectatorDirective } from '@ngneat/spectator/jest'; import { createDirectiveFactory, SpectatorDirective } from '@ngneat/spectator/jest';
import { BehaviorSubject } from 'rxjs'; import { BehaviorSubject } from 'rxjs';
import { ReplaceableTemplateDirective } from '../directives'; import { ReplaceableTemplateDirective } from '../directives/replaceable-template.directive';
import { ReplaceableComponents } from '../models'; import { ReplaceableComponents } from '../models/replaceable-components';
import { ReplaceableComponentsService } from '../services/replaceable-components.service'; import { ReplaceableComponentsService } from '../services/replaceable-components.service';
@Component({ @Component({

7
npm/ng-packs/packages/core/src/lib/tests/rest.service.spec.ts

@ -2,10 +2,11 @@ import { createHttpFactory, HttpMethod, SpectatorHttp, SpyObject } from '@ngneat
import { OAuthService } from 'angular-oauth2-oidc'; import { OAuthService } from 'angular-oauth2-oidc';
import { of, throwError } from 'rxjs'; import { of, throwError } from 'rxjs';
import { catchError } from 'rxjs/operators'; import { catchError } from 'rxjs/operators';
import { Rest } from '../models'; import { Rest } from '../models/rest';
import { EnvironmentService, HttpErrorReporterService } from '../services'; import { EnvironmentService } from '../services/environment.service';
import { HttpErrorReporterService } from '../services/http-error-reporter.service';
import { RestService } from '../services/rest.service'; import { RestService } from '../services/rest.service';
import { CORE_OPTIONS } from '../tokens'; import { CORE_OPTIONS } from '../tokens/options.token';
describe('HttpClient testing', () => { describe('HttpClient testing', () => {
let spectator: SpectatorHttp<RestService>; let spectator: SpectatorHttp<RestService>;

2
npm/ng-packs/packages/core/src/lib/tests/route-utils.spec.ts

@ -1,7 +1,7 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { createRoutingFactory, SpectatorRouting } from '@ngneat/spectator/jest'; import { createRoutingFactory, SpectatorRouting } from '@ngneat/spectator/jest';
import { RouterOutletComponent } from '../components'; import { RouterOutletComponent } from '../components/router-outlet.component';
import { RoutesService } from '../services/routes.service'; import { RoutesService } from '../services/routes.service';
import { findRoute, getRoutePath } from '../utils/route-utils'; import { findRoute, getRoutePath } from '../utils/route-utils';

4
npm/ng-packs/packages/core/src/lib/tests/routes.handler.spec.ts

@ -1,6 +1,6 @@
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { RoutesHandler } from '../handlers'; import { RoutesHandler } from '../handlers/routes.handler';
import { RoutesService } from '../services'; import { RoutesService } from '../services/routes.service';
describe('Routes Handler', () => { describe('Routes Handler', () => {
describe('#add', () => { describe('#add', () => {

4
npm/ng-packs/packages/core/src/lib/tests/routes.service.spec.ts

@ -1,10 +1,10 @@
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import { take } from 'rxjs/operators'; import { take } from 'rxjs/operators';
import { RoutesService } from '../services'; import { RoutesService } from '../services/routes.service';
import { DummyInjector } from './utils/common.utils'; import { DummyInjector } from './utils/common.utils';
import { mockPermissionService } from './utils/permission-service.spec.utils'; import { mockPermissionService } from './utils/permission-service.spec.utils';
const updateStream$ = new Subject(); const updateStream$ = new Subject<void>();
export const mockRoutesService = (injectorPayload = {} as { [key: string]: any }) => { export const mockRoutesService = (injectorPayload = {} as { [key: string]: any }) => {
const injector = new DummyInjector({ const injector = new DummyInjector({

7
npm/ng-packs/packages/core/src/lib/tests/validators.spec.ts

@ -1,10 +1,13 @@
import { FormControl, Validators } from '@angular/forms'; import { FormControl, Validators } from '@angular/forms';
import { AbpValidators, validateMinAge, validateRange } from '../validators'; import { validateMinAge } from '../validators/age.validator';
import { validateRange } from '../validators/range.validator';
import { validateCreditCard } from '../validators/credit-card.validator'; import { validateCreditCard } from '../validators/credit-card.validator';
import { validateRequired } from '../validators/required.validator'; import { validateRequired } from '../validators/required.validator';
import { validateStringLength } from '../validators/string-length.validator'; import { validateStringLength } from '../validators/string-length.validator';
import { validateUrl } from '../validators/url.validator'; import { validateUrl } from '../validators/url.validator';
const emailAddress = () => Validators.email;
describe('Validators', () => { describe('Validators', () => {
describe('Credit Card Validator', () => { describe('Credit Card Validator', () => {
const error = { creditCard: true }; const error = { creditCard: true };
@ -41,7 +44,7 @@ describe('Validators', () => {
describe('Email Validator', () => { describe('Email Validator', () => {
it('should return email validator of Angular', () => { it('should return email validator of Angular', () => {
expect(AbpValidators.emailAddress()).toBe(Validators.email); expect(emailAddress()).toBe(Validators.email);
}); });
}); });

6
npm/ng-packs/packages/core/src/lib/validators/url.validator.ts

@ -1,5 +1,5 @@
import { AbstractControl, ValidatorFn } from '@angular/forms'; import { AbstractControl, ValidatorFn } from '@angular/forms';
import { isNullOrUndefined } from '../utils'; import { isNullOrEmpty } from '../utils';
export interface UrlError { export interface UrlError {
url: true; url: true;
@ -7,11 +7,11 @@ export interface UrlError {
export function validateUrl(): ValidatorFn { export function validateUrl(): ValidatorFn {
return (control: AbstractControl): UrlError | null => { return (control: AbstractControl): UrlError | null => {
if (isNullOrUndefined(control.value)) return null; if (isNullOrEmpty(control.value)) return null;
return isValidUrl(control.value) ? null : { url: true }; return isValidUrl(control.value) ? null : { url: true };
}; };
} }
function isValidUrl(value: string): boolean { function isValidUrl(value: string): boolean {
if (/^http(s)?:\/\/[^/]/.test(value) || /^ftp:\/\/[^/]/.test(value)) { if (/^http(s)?:\/\/[^/]/.test(value) || /^ftp:\/\/[^/]/.test(value)) {

3
npm/ng-packs/packages/core/tsconfig.json

@ -11,6 +11,7 @@
} }
], ],
"compilerOptions": { "compilerOptions": {
"allowSyntheticDefaultImports": true "allowSyntheticDefaultImports": true,
"target": "es2020"
} }
} }

4
npm/ng-packs/packages/core/tsconfig.lib.json

@ -2,13 +2,13 @@
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../dist/out-tsc", "outDir": "../../dist/out-tsc",
"target": "es2015", "target": "es2020",
"declaration": true, "declaration": true,
"declarationMap": true, "declarationMap": true,
"inlineSources": true, "inlineSources": true,
"types": [], "types": [],
"lib": ["dom", "es2018"] "lib": ["dom", "es2018"]
}, },
"exclude": ["src/test-setup.ts", "**/*.spec.ts"], "exclude": ["src/test-setup.ts", "**/*.spec.ts", "jest.config.ts"],
"include": ["**/*.ts"] "include": ["**/*.ts"]
} }

2
npm/ng-packs/packages/core/tsconfig.spec.json

@ -7,5 +7,5 @@
"esModuleInterop": true "esModuleInterop": true
}, },
"files": ["src/test-setup.ts"], "files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"] "include": ["**/*.ts"]
} }

3
npm/ng-packs/packages/feature-management/jest.config.js → npm/ng-packs/packages/feature-management/jest.config.ts

@ -1,4 +1,5 @@
module.exports = { /* eslint-disable */
export default {
displayName: 'feature-management', displayName: 'feature-management',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],

5
npm/ng-packs/packages/feature-management/tsconfig.json

@ -9,5 +9,8 @@
{ {
"path": "./tsconfig.spec.json" "path": "./tsconfig.spec.json"
} }
] ],
"compilerOptions": {
"target": "es2020"
}
} }

4
npm/ng-packs/packages/feature-management/tsconfig.lib.json

@ -2,13 +2,13 @@
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../dist/out-tsc", "outDir": "../../dist/out-tsc",
"target": "es2015", "target": "es2020",
"declaration": true, "declaration": true,
"declarationMap": true, "declarationMap": true,
"inlineSources": true, "inlineSources": true,
"types": [], "types": [],
"lib": ["dom", "es2018"] "lib": ["dom", "es2018"]
}, },
"exclude": ["src/test-setup.ts", "**/*.spec.ts"], "exclude": ["src/test-setup.ts", "**/*.spec.ts", "jest.config.ts"],
"include": ["**/*.ts"] "include": ["**/*.ts"]
} }

2
npm/ng-packs/packages/feature-management/tsconfig.spec.json

@ -7,5 +7,5 @@
"esModuleInterop": true "esModuleInterop": true
}, },
"files": ["src/test-setup.ts"], "files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"] "include": ["**/*.spec.ts", "**/*.d.ts", "jest.config.ts"]
} }

3
npm/ng-packs/packages/identity/jest.config.js → npm/ng-packs/packages/identity/jest.config.ts

@ -1,4 +1,5 @@
module.exports = { /* eslint-disable */
export default {
displayName: 'identity', displayName: 'identity',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],

4
npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.ts

@ -8,7 +8,7 @@ import {
generateFormFromProps, generateFormFromProps,
} from '@abp/ng.theme.shared/extensions'; } from '@abp/ng.theme.shared/extensions';
import { Component, Injector, OnInit } from '@angular/core'; import { Component, Injector, OnInit } from '@angular/core';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
import { finalize } from 'rxjs/operators'; import { finalize } from 'rxjs/operators';
import { eIdentityComponents } from '../../enums/components'; import { eIdentityComponents } from '../../enums/components';
@ -26,7 +26,7 @@ import { eIdentityComponents } from '../../enums/components';
export class RolesComponent implements OnInit { export class RolesComponent implements OnInit {
data: PagedResultDto<IdentityRoleDto> = { items: [], totalCount: 0 }; data: PagedResultDto<IdentityRoleDto> = { items: [], totalCount: 0 };
form: FormGroup; form: UntypedFormGroup;
selected: IdentityRoleDto; selected: IdentityRoleDto;

10
npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts

@ -20,7 +20,7 @@ import {
TrackByFunction, TrackByFunction,
ViewChild, ViewChild,
} from '@angular/core'; } from '@angular/core';
import { AbstractControl, FormArray, FormBuilder, FormGroup } from '@angular/forms'; import { AbstractControl, UntypedFormArray, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
import { finalize, switchMap, tap } from 'rxjs/operators'; import { finalize, switchMap, tap } from 'rxjs/operators';
import { eIdentityComponents } from '../../enums/components'; import { eIdentityComponents } from '../../enums/components';
@ -41,7 +41,7 @@ export class UsersComponent implements OnInit {
@ViewChild('modalContent', { static: false }) @ViewChild('modalContent', { static: false })
modalContent: TemplateRef<any>; modalContent: TemplateRef<any>;
form: FormGroup; form: UntypedFormGroup;
selected: IdentityUserDto; selected: IdentityUserDto;
@ -67,8 +67,8 @@ export class UsersComponent implements OnInit {
this.visiblePermissions = event; this.visiblePermissions = event;
}; };
get roleGroups(): FormGroup[] { get roleGroups(): UntypedFormGroup[] {
return ((this.form.get('roleNames') as FormArray)?.controls as FormGroup[]) || []; return ((this.form.get('roleNames') as UntypedFormArray)?.controls as UntypedFormGroup[]) || [];
} }
constructor( constructor(
@ -76,7 +76,7 @@ export class UsersComponent implements OnInit {
protected confirmationService: ConfirmationService, protected confirmationService: ConfirmationService,
protected service: IdentityUserService, protected service: IdentityUserService,
private toasterService: ToasterService, private toasterService: ToasterService,
protected fb: FormBuilder, protected fb: UntypedFormBuilder,
protected injector: Injector, protected injector: Injector,
) {} ) {}

5
npm/ng-packs/packages/identity/tsconfig.json

@ -9,5 +9,8 @@
{ {
"path": "./tsconfig.spec.json" "path": "./tsconfig.spec.json"
} }
] ],
"compilerOptions": {
"target": "es2020"
}
} }

4
npm/ng-packs/packages/identity/tsconfig.lib.json

@ -2,13 +2,13 @@
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../dist/out-tsc", "outDir": "../../dist/out-tsc",
"target": "es2015", "target": "es2020",
"declaration": true, "declaration": true,
"declarationMap": true, "declarationMap": true,
"inlineSources": true, "inlineSources": true,
"types": [], "types": [],
"lib": ["dom", "es2018"] "lib": ["dom", "es2018"]
}, },
"exclude": ["src/test-setup.ts", "**/*.spec.ts"], "exclude": ["src/test-setup.ts", "**/*.spec.ts", "jest.config.ts"],
"include": ["**/*.ts"] "include": ["**/*.ts"]
} }

2
npm/ng-packs/packages/identity/tsconfig.spec.json

@ -7,5 +7,5 @@
"esModuleInterop": true "esModuleInterop": true
}, },
"files": ["src/test-setup.ts"], "files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"] "include": ["**/*.spec.ts", "**/*.d.ts", "jest.config.ts"]
} }

3
npm/ng-packs/packages/permission-management/jest.config.js → npm/ng-packs/packages/permission-management/jest.config.ts

@ -1,4 +1,5 @@
module.exports = { /* eslint-disable */
export default {
displayName: 'permission-management', displayName: 'permission-management',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],

5
npm/ng-packs/packages/permission-management/tsconfig.json

@ -9,5 +9,8 @@
{ {
"path": "./tsconfig.spec.json" "path": "./tsconfig.spec.json"
} }
] ],
"compilerOptions": {
"target": "es2020"
}
} }

4
npm/ng-packs/packages/permission-management/tsconfig.lib.json

@ -2,13 +2,13 @@
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../dist/out-tsc", "outDir": "../../dist/out-tsc",
"target": "es2015", "target": "es2020",
"declaration": true, "declaration": true,
"declarationMap": true, "declarationMap": true,
"inlineSources": true, "inlineSources": true,
"types": [], "types": [],
"lib": ["dom", "es2018"] "lib": ["dom", "es2018"]
}, },
"exclude": ["src/test-setup.ts", "**/*.spec.ts"], "exclude": ["src/test-setup.ts", "**/*.spec.ts", "jest.config.ts"],
"include": ["**/*.ts"] "include": ["**/*.ts"]
} }

2
npm/ng-packs/packages/permission-management/tsconfig.spec.json

@ -7,5 +7,5 @@
"esModuleInterop": true "esModuleInterop": true
}, },
"files": ["src/test-setup.ts"], "files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"] "include": ["**/*.spec.ts", "**/*.d.ts", "jest.config.ts"]
} }

3
npm/ng-packs/packages/schematics/jest.config.js → npm/ng-packs/packages/schematics/jest.config.ts

@ -1,4 +1,5 @@
module.exports = { /* eslint-disable */
export default {
displayName: 'schematics', displayName: 'schematics',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],

9
npm/ng-packs/packages/schematics/package.json

@ -9,15 +9,16 @@
"license": "MIT", "license": "MIT",
"schematics": "./collection.json", "schematics": "./collection.json",
"dependencies": { "dependencies": {
"@angular-devkit/core": "~13.3.9", "@angular-devkit/core": "~14.2.1",
"@angular-devkit/schematics": "~13.3.9", "@angular/cli": "~14.2.1",
"@angular-devkit/schematics": "~14.2.1",
"got": "^11.5.2", "got": "^11.5.2",
"jsonc-parser": "^2.3.0", "jsonc-parser": "^2.3.0",
"should-quote": "^1.0.0", "should-quote": "^1.0.0",
"typescript": "~4.6.4" "typescript": "~4.7.4"
}, },
"devDependencies": { "devDependencies": {
"@schematics/angular": "~11.0.2", "@schematics/angular": "~14.2.1",
"@types/jest": "^26.0.0", "@types/jest": "^26.0.0",
"@types/node": "^12.11.1", "@types/node": "^12.11.1",
"jest": "^26.0.0", "jest": "^26.0.0",

3
npm/ng-packs/packages/schematics/src/commands/api/index.ts

@ -4,7 +4,6 @@ import {
branchAndMerge, branchAndMerge,
chain, chain,
move, move,
SchematicContext,
SchematicsException, SchematicsException,
Tree, Tree,
url, url,
@ -36,7 +35,7 @@ export default function (schema: GenerateProxySchema) {
const moduleName = params.module || 'app'; const moduleName = params.module || 'app';
return chain([ return chain([
async (tree: Tree, _context: SchematicContext) => { async (tree: Tree) => {
const getRootNamespace = createRootNamespaceGetter(params); const getRootNamespace = createRootNamespaceGetter(params);
const solution = await getRootNamespace(tree); const solution = await getRootNamespace(tree);

2
npm/ng-packs/packages/schematics/src/commands/create-lib/files-package/__libraryName@kebab__/tsconfig.lib.json.template

@ -3,7 +3,7 @@
"extends": "../../tsconfig.json", "extends": "../../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../out-tsc/lib", "outDir": "../../out-tsc/lib",
"target": "es2015", "target": "es2020",
"declaration": true, "declaration": true,
"declarationMap": true, "declarationMap": true,
"inlineSources": true, "inlineSources": true,

9
npm/ng-packs/packages/schematics/src/commands/create-lib/index.ts

@ -4,7 +4,6 @@ import {
move, move,
noop, noop,
Rule, Rule,
SchematicContext,
SchematicsException, SchematicsException,
Tree, Tree,
url, url,
@ -59,7 +58,7 @@ async function checkLibExist(options: GenerateLibSchema, tree: Tree) {
} }
function createLibrary(options: GenerateLibSchema): Rule { function createLibrary(options: GenerateLibSchema): Rule {
return async (tree: Tree, _context: SchematicContext) => { return async (tree: Tree) => {
const target = await resolveProject(tree, options.packageName, null); const target = await resolveProject(tree, options.packageName, null);
if (!target || options.override) { if (!target || options.override) {
if (options.isModuleTemplate) { if (options.isModuleTemplate) {
@ -83,9 +82,7 @@ async function resolvePackagesDirFromAngularJson(host: Tree) {
function readFirstLibInAngularJson(workspace: WorkspaceDefinition): ProjectDefinition | undefined { function readFirstLibInAngularJson(workspace: WorkspaceDefinition): ProjectDefinition | undefined {
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
const [_, props] = return Array.from(workspace.projects.values()).find(value => isLibrary(value));
Array.from(workspace.projects.entries()).find(([_, value]) => isLibrary(value)) || [];
return props;
} }
async function createLibFromModuleTemplate(tree: Tree, options: GenerateLibSchema) { async function createLibFromModuleTemplate(tree: Tree, options: GenerateLibSchema) {
@ -107,7 +104,7 @@ async function createLibFromModuleTemplate(tree: Tree, options: GenerateLibSchem
} }
export function addLibToWorkspaceIfNotExist(name: string, packagesDir: string): Rule { export function addLibToWorkspaceIfNotExist(name: string, packagesDir: string): Rule {
return async (tree: Tree, _: SchematicContext) => { return async (tree: Tree) => {
const workspace = await getWorkspace(tree); const workspace = await getWorkspace(tree);
const packageName = kebab(name); const packageName = kebab(name);
const isProjectExist = workspace.projects.has(packageName); const isProjectExist = workspace.projects.has(packageName);

4
npm/ng-packs/packages/schematics/src/commands/proxy-add/index.ts

@ -1,4 +1,4 @@
import { chain, SchematicContext, Tree } from '@angular-devkit/schematics'; import { chain, Tree } from '@angular-devkit/schematics';
import { GenerateProxySchema } from '../../models'; import { GenerateProxySchema } from '../../models';
import { import {
buildTargetPath, buildTargetPath,
@ -19,7 +19,7 @@ export default function (schema: GenerateProxySchema) {
const moduleName = params.module || 'app'; const moduleName = params.module || 'app';
return chain([ return chain([
async (host: Tree, _context: SchematicContext) => { async (host: Tree) => {
const target = await resolveProject(host, params.target!); const target = await resolveProject(host, params.target!);
const targetPath = buildTargetPath(target.definition, params.entryPoint); const targetPath = buildTargetPath(target.definition, params.entryPoint);
const readProxyConfig = createProxyConfigReader(targetPath); const readProxyConfig = createProxyConfigReader(targetPath);

4
npm/ng-packs/packages/schematics/src/commands/proxy-index/index.ts

@ -1,4 +1,4 @@
import { SchematicContext, Tree } from '@angular-devkit/schematics'; import { Tree } from '@angular-devkit/schematics';
import { import {
buildTargetPath, buildTargetPath,
createProxyIndexGenerator, createProxyIndexGenerator,
@ -9,7 +9,7 @@ import {
export default function (schema: { target?: string; entryPoint?: string }) { export default function (schema: { target?: string; entryPoint?: string }) {
const params = removeDefaultPlaceholders(schema); const params = removeDefaultPlaceholders(schema);
return async (host: Tree, _context: SchematicContext) => { return async (host: Tree) => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const target = await resolveProject(host, params.target!); const target = await resolveProject(host, params.target!);
const targetPath = buildTargetPath(target.definition, params.entryPoint); const targetPath = buildTargetPath(target.definition, params.entryPoint);

4
npm/ng-packs/packages/schematics/src/commands/proxy-refresh/index.ts

@ -1,4 +1,4 @@
import { chain, SchematicContext, Tree } from '@angular-devkit/schematics'; import { chain, Tree } from '@angular-devkit/schematics';
import { GenerateProxySchema } from '../../models'; import { GenerateProxySchema } from '../../models';
import { import {
buildTargetPath, buildTargetPath,
@ -16,7 +16,7 @@ import {
export default function (schema: GenerateProxySchema) { export default function (schema: GenerateProxySchema) {
const params = removeDefaultPlaceholders(schema); const params = removeDefaultPlaceholders(schema);
return async (host: Tree, _context: SchematicContext) => { return async (host: Tree) => {
const target = await resolveProject(host, params.target!); const target = await resolveProject(host, params.target!);
const targetPath = buildTargetPath(target.definition, params.entryPoint); const targetPath = buildTargetPath(target.definition, params.entryPoint);

4
npm/ng-packs/packages/schematics/src/commands/proxy-remove/index.ts

@ -1,4 +1,4 @@
import { chain, SchematicContext, Tree } from '@angular-devkit/schematics'; import { chain, Tree } from '@angular-devkit/schematics';
import { GenerateProxySchema } from '../../models'; import { GenerateProxySchema } from '../../models';
import { import {
buildTargetPath, buildTargetPath,
@ -17,7 +17,7 @@ export default function (schema: GenerateProxySchema) {
const params = removeDefaultPlaceholders(schema); const params = removeDefaultPlaceholders(schema);
const moduleName = params.module || 'app'; const moduleName = params.module || 'app';
return async (host: Tree, _context: SchematicContext) => { return async (host: Tree) => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const target = await resolveProject(host, params.target!); const target = await resolveProject(host, params.target!);
const targetPath = buildTargetPath(target.definition, params.entryPoint); const targetPath = buildTargetPath(target.definition, params.entryPoint);

4
npm/ng-packs/packages/schematics/src/models/api-definition.ts

@ -56,6 +56,8 @@ export interface ParameterInSignature {
type: string; type: string;
typeSimple: string; typeSimple: string;
isOptional: boolean; isOptional: boolean;
// eslint-disable-next-line
// @typescript-eslint/no-explicit-any
defaultValue: any; defaultValue: any;
} }
@ -66,6 +68,8 @@ export interface ParameterInBody {
type: string; type: string;
typeSimple: string; typeSimple: string;
isOptional: boolean; isOptional: boolean;
// eslint-disable-next-line
// @typescript-eslint/no-explicit-any
defaultValue: any; defaultValue: any;
constraintTypes: string[] | null; constraintTypes: string[] | null;
bindingSourceId: eBindingSourceId; bindingSourceId: eBindingSourceId;

2
npm/ng-packs/packages/schematics/src/utils/angular/README.md

@ -1,5 +1,5 @@
**DISCLAIMER** **DISCLAIMER**
This directory is a direct copy of https://github.com/angular/angular-cli/tree/d091bb0c7b76a73e1b7d4b5690c532c68452b1d6 and is used under terms and permissions by the MIT license granted by Google, Inc. This directory is a direct copy of https://github.com/angular/angular-cli/tree/c5ef701639755d5b390e64287963ee35faab2cd4/packages/schematics/angular/utility and is used under terms and permissions by the MIT license granted by Google, LLC.
All credits go to Angular team for building these utilities. All credits go to Angular team for building these utilities.

173
npm/ng-packs/packages/schematics/src/utils/angular/dependency.ts

@ -0,0 +1,173 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { Rule, SchematicContext } from '@angular-devkit/schematics';
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
import * as path from 'path';
const installTasks = new WeakMap<SchematicContext, Set<string>>();
interface MinimalPackageManifest {
dependencies?: Record<string, string>;
devDependencies?: Record<string, string>;
peerDependencies?: Record<string, string>;
}
/**
* An enum used to specify the type of a dependency found within a package manifest
* file (`package.json`).
*/
export enum DependencyType {
Default = 'dependencies',
Dev = 'devDependencies',
Peer = 'peerDependencies',
}
/**
* An enum used to specify the dependency installation behavior for the {@link addDependency}
* schematics rule. The installation behavior affects if and when {@link NodePackageInstallTask}
* will be scheduled when using the rule.
*/
export enum InstallBehavior {
/**
* No installation will occur as a result of the rule when specified.
*
* NOTE: This does not prevent other rules from scheduling a {@link NodePackageInstallTask}
* which may install the dependency.
*/
None,
/**
* Automatically determine the need to schedule a {@link NodePackageInstallTask} based on
* previous usage of the {@link addDependency} within the schematic.
*/
Auto,
/**
* Always schedule a {@link NodePackageInstallTask} when the rule is executed.
*/
Always,
}
/**
* An enum used to specify the existing dependency behavior for the {@link addDependency}
* schematics rule. The existing behavior affects whether the named dependency will be added
* to the `package.json` when the dependency is already present with a differing specifier.
*/
export enum ExistingBehavior {
/**
* The dependency will not be added or otherwise changed if it already exists.
*/
Skip,
/**
* The dependency's existing specifier will be replaced with the specifier provided in the
* {@link addDependency} call. A warning will also be shown during schematic execution to
* notify the user of the replacement.
*/
Replace,
}
/**
* Adds a package as a dependency to a `package.json`. By default the `package.json` located
* at the schematic's root will be used. The `manifestPath` option can be used to explicitly specify
* a `package.json` in different location. The type of the dependency can also be specified instead
* of the default of the `dependencies` section by using the `type` option for either `devDependencies`
* or `peerDependencies`.
*
* When using this rule, {@link NodePackageInstallTask} does not need to be included directly by
* a schematic. A package manager install task will be automatically scheduled as needed.
*
* @param name The name of the package to add.
* @param specifier The package specifier for the package to add. Typically a SemVer range.
* @param options An optional object that can contain the `type` of the dependency
* and/or a path (`packageJsonPath`) of a manifest file (`package.json`) to modify.
* @returns A Schematics {@link Rule}
*/
export function addDependency(
name: string,
specifier: string,
options: {
/**
* The type of the dependency determines the section of the `package.json` to which the
* dependency will be added. Defaults to {@link DependencyType.Default} (`dependencies`).
*/
type?: DependencyType;
/**
* The path of the package manifest file (`package.json`) that will be modified.
* Defaults to `/package.json`.
*/
packageJsonPath?: string;
/**
* The dependency installation behavior to use to determine whether a
* {@link NodePackageInstallTask} should be scheduled after adding the dependency.
* Defaults to {@link InstallBehavior.Auto}.
*/
install?: InstallBehavior;
/**
* The behavior to use when the dependency already exists within the `package.json`.
* Defaults to {@link ExistingBehavior.Replace}.
*/
existing?: ExistingBehavior;
} = {},
): Rule {
const {
type = DependencyType.Default,
packageJsonPath = '/package.json',
install = InstallBehavior.Auto,
existing = ExistingBehavior.Replace,
} = options;
return (tree, context) => {
const manifest = tree.readJson(packageJsonPath) as MinimalPackageManifest;
const dependencySection = manifest[type];
if (!dependencySection) {
// Section is not present. The dependency can be added to a new object literal for the section.
manifest[type] = { [name]: specifier };
} else {
const existingSpecifier = dependencySection[name];
if (existingSpecifier === specifier) {
// Already present with same specifier
return;
}
if (existingSpecifier) {
// Already present but different specifier
if (existing === ExistingBehavior.Skip) {
return;
}
// ExistingBehavior.Replace is the only other behavior currently
context.logger.warn(
`Package dependency "${name}" already exists with a different specifier. ` +
`"${existingSpecifier}" will be replaced with "${specifier}".`,
);
}
// Add new dependency in alphabetical order
const entries = Object.entries(dependencySection);
entries.push([name, specifier]);
entries.sort((a, b) => a[0].localeCompare(b[0]));
manifest[type] = Object.fromEntries(entries);
}
tree.overwrite(packageJsonPath, JSON.stringify(manifest, null, 2));
const installPaths = installTasks.get(context) ?? new Set<string>();
if (
install === InstallBehavior.Always ||
(install === InstallBehavior.Auto && !installPaths.has(packageJsonPath))
) {
context.addTask(
new NodePackageInstallTask({ workingDirectory: path.dirname(packageJsonPath) }),
);
installPaths.add(packageJsonPath);
installTasks.set(context, installPaths);
}
};
}

4
npm/ng-packs/packages/schematics/src/utils/angular/find-module.ts

@ -17,6 +17,7 @@ export interface ModuleOptions {
skipImport?: boolean; skipImport?: boolean;
moduleExt?: string; moduleExt?: string;
routingModuleExt?: string; routingModuleExt?: string;
standalone?: boolean;
} }
export const MODULE_EXT = '.module.ts'; export const MODULE_EXT = '.module.ts';
@ -26,8 +27,7 @@ export const ROUTING_MODULE_EXT = '-routing.module.ts';
* Find the module referred by a set of options passed to the schematics. * Find the module referred by a set of options passed to the schematics.
*/ */
export function findModuleFromOptions(host: Tree, options: ModuleOptions): Path | undefined { export function findModuleFromOptions(host: Tree, options: ModuleOptions): Path | undefined {
// eslint-disable-next-line no-prototype-builtins if (options.standalone || options.skipImport) {
if (options.hasOwnProperty('skipImport') && options.skipImport) {
return undefined; return undefined;
} }

15
npm/ng-packs/packages/schematics/src/utils/angular/generate-from-files.ts

@ -6,8 +6,9 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import { strings } from '@angular-devkit/core';
import { import {
Rule,
Tree,
apply, apply,
applyTemplates, applyTemplates,
chain, chain,
@ -15,11 +16,11 @@ import {
mergeWith, mergeWith,
move, move,
noop, noop,
Rule, strings,
Tree,
url, url,
} from '@angular-devkit/schematics'; } from '@angular-devkit/schematics';
import { parseName } from './parse-name'; import { parseName } from './parse-name';
import { validateClassName } from './validation';
import { createDefaultPath } from './workspace'; import { createDefaultPath } from './workspace';
export interface GenerateFromFilesOptions { export interface GenerateFromFilesOptions {
@ -36,18 +37,18 @@ export function generateFromFiles(
extraTemplateValues: Record<string, string | ((v: string) => string)> = {}, extraTemplateValues: Record<string, string | ((v: string) => string)> = {},
): Rule { ): Rule {
return async (host: Tree) => { return async (host: Tree) => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
options.path ??= await createDefaultPath(host, options.project as string); options.path ??= await createDefaultPath(host, options.project as string);
options.prefix ??= ''; options.prefix ??= '';
options.flat ??= true; options.flat ??= true;
const parsedPath = parseName(options.path!, options.name); const parsedPath = parseName(options.path, options.name);
options.name = parsedPath.name; options.name = parsedPath.name;
options.path = parsedPath.path; options.path = parsedPath.path;
validateClassName(strings.classify(options.name));
const templateSource = apply(url('./files'), [ const templateSource = apply(url('./files'), [
options.skipTests ? filter(path => !path.endsWith('.spec.ts.template')) : noop(), options.skipTests ? filter((path) => !path.endsWith('.spec.ts.template')) : noop(),
applyTemplates({ applyTemplates({
...strings, ...strings,
...options, ...options,

7
npm/ng-packs/packages/schematics/src/utils/angular/json-file.ts

@ -27,12 +27,7 @@ export class JSONFile {
content: string; content: string;
constructor(private readonly host: Tree, private readonly path: string) { constructor(private readonly host: Tree, private readonly path: string) {
const buffer = this.host.read(this.path); this.content = this.host.readText(this.path);
if (buffer) {
this.content = buffer.toString();
} else {
throw new Error(`Could not read '${path}'.`);
}
} }
private _jsonAst: Node | undefined; private _jsonAst: Node | undefined;

25
npm/ng-packs/packages/schematics/src/utils/angular/latest-versions/package.json

@ -1,20 +1,23 @@
{ {
"description": "Package versions used by schematics in @schematics/angular.", "description": "Package versions used by schematics in @schematics/angular.",
"comment": "This file is needed so that depedencies are synced by Renovate.", "comment": "This file is needed so that dependencies are synced by Renovate.",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@types/jasmine": "~3.10.0", "@types/jasmine": "~4.0.0",
"@types/node": "^12.11.1", "@types/node": "^14.15.0",
"jasmine-core": "~4.0.0", "jasmine-core": "~4.3.0",
"jasmine-spec-reporter": "~7.0.0",
"karma-chrome-launcher": "~3.1.0", "karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.1.0", "karma-coverage": "~2.2.0",
"karma-jasmine-html-reporter": "~1.7.0", "karma-jasmine-html-reporter": "~2.0.0",
"karma-jasmine": "~4.0.0", "karma-jasmine": "~5.1.0",
"karma": "~6.3.0", "karma": "~6.4.0",
"ng-packagr": "^13.0.0", "ng-packagr": "^14.2.0",
"rxjs": "~6.6.7", "protractor": "~7.0.0",
"rxjs": "~7.5.0",
"tslib": "^2.3.0", "tslib": "^2.3.0",
"typescript": "~4.6.2", "ts-node": "~10.9.0",
"typescript": "~4.7.2",
"zone.js": "~0.11.4" "zone.js": "~0.11.4"
} }
} }

12
npm/ng-packs/packages/schematics/src/utils/angular/ng-ast-utils.ts

@ -13,11 +13,7 @@ import * as ts from 'typescript';
import { findNode, getSourceNodes } from './ast-utils'; import { findNode, getSourceNodes } from './ast-utils';
export function findBootstrapModuleCall(host: Tree, mainPath: string): ts.CallExpression | null { export function findBootstrapModuleCall(host: Tree, mainPath: string): ts.CallExpression | null {
const mainBuffer = host.read(mainPath); const mainText = host.readText(mainPath);
if (!mainBuffer) {
throw new SchematicsException(`Main file (${mainPath}) not found`);
}
const mainText = mainBuffer.toString('utf-8');
const source = ts.createSourceFile(mainPath, mainText, ts.ScriptTarget.Latest, true); const source = ts.createSourceFile(mainPath, mainText, ts.ScriptTarget.Latest, true);
const allNodes = getSourceNodes(source); const allNodes = getSourceNodes(source);
@ -58,11 +54,7 @@ export function findBootstrapModulePath(host: Tree, mainPath: string): string {
const bootstrapModule = bootstrapCall.arguments[0]; const bootstrapModule = bootstrapCall.arguments[0];
const mainBuffer = host.read(mainPath); const mainText = host.readText(mainPath);
if (!mainBuffer) {
throw new SchematicsException(`Client application main file (${mainPath}) not found`);
}
const mainText = mainBuffer.toString('utf-8');
const source = ts.createSourceFile(mainPath, mainText, ts.ScriptTarget.Latest, true); const source = ts.createSourceFile(mainPath, mainText, ts.ScriptTarget.Latest, true);
const allNodes = getSourceNodes(source); const allNodes = getSourceNodes(source);
const bootstrapModuleRelativePath = allNodes const bootstrapModuleRelativePath = allNodes

13
npm/ng-packs/packages/schematics/src/utils/angular/validation.ts

@ -6,16 +6,23 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import { tags } from '@angular-devkit/core';
import { SchematicsException } from '@angular-devkit/schematics'; import { SchematicsException } from '@angular-devkit/schematics';
// Must start with a letter, and must contain only alphanumeric characters or dashes. // Must start with a letter, and must contain only alphanumeric characters or dashes.
// When adding a dash the segment after the dash must also start with a letter. // When adding a dash the segment after the dash must also start with a letter.
export const htmlSelectorRe = /^[a-zA-Z][.0-9a-zA-Z]*(:?-[a-zA-Z][.0-9a-zA-Z]*)*$/; export const htmlSelectorRe = /^[a-zA-Z][.0-9a-zA-Z]*(:?-[a-zA-Z][.0-9a-zA-Z]*)*$/;
// See: https://github.com/tc39/proposal-regexp-unicode-property-escapes/blob/fe6d07fad74cd0192d154966baa1e95e7cda78a1/README.md#other-examples
const ecmaIdentifierNameRegExp = /^(?:[$_\p{ID_Start}])(?:[$_\u200C\u200D\p{ID_Continue}])*$/u;
export function validateHtmlSelector(selector: string): void { export function validateHtmlSelector(selector: string): void {
if (selector && !htmlSelectorRe.test(selector)) { if (selector && !htmlSelectorRe.test(selector)) {
throw new SchematicsException(tags.oneLine`Selector (${selector}) throw new SchematicsException(`Selector "${selector}" is invalid.`);
is invalid.`); }
}
export function validateClassName(className: string): void {
if (!ecmaIdentifierNameRegExp.test(className)) {
throw new SchematicsException(`Class name "${className}" is invalid.`);
} }
} }

15
npm/ng-packs/packages/schematics/src/utils/angular/workspace-models.ts

@ -11,6 +11,12 @@ export enum ProjectType {
Library = 'library', Library = 'library',
} }
/**
* An enum of the official Angular builders.
* Each enum value provides the fully qualified name of the associated builder.
* This enum can be used when analyzing the `builder` fields of project configurations from the
* `angular.json` workspace file.
*/
export enum Builders { export enum Builders {
AppShell = '@angular-devkit/build-angular:app-shell', AppShell = '@angular-devkit/build-angular:app-shell',
Server = '@angular-devkit/build-angular:server', Server = '@angular-devkit/build-angular:server',
@ -129,10 +135,15 @@ export type ServeBuilderTarget = BuilderTarget<Builders.DevServer, ServeBuilderO
export type ExtractI18nBuilderTarget = BuilderTarget<Builders.ExtractI18n, ExtractI18nOptions>; export type ExtractI18nBuilderTarget = BuilderTarget<Builders.ExtractI18n, ExtractI18nOptions>;
export type E2EBuilderTarget = BuilderTarget<Builders.Protractor, E2EOptions>; export type E2EBuilderTarget = BuilderTarget<Builders.Protractor, E2EOptions>;
interface WorkspaceCLISchema {
warnings?: Record<string, boolean>;
schematicCollections?: string[];
defaultCollection?: string;
}
export interface WorkspaceSchema { export interface WorkspaceSchema {
version: 1; version: 1;
defaultProject?: string; defaultProject?: string;
cli?: { warnings?: Record<string, boolean> }; cli?: WorkspaceCLISchema;
projects: { projects: {
[key: string]: WorkspaceProject<ProjectType.Application | ProjectType.Library>; [key: string]: WorkspaceProject<ProjectType.Application | ProjectType.Library>;
}; };
@ -148,7 +159,7 @@ export interface WorkspaceProject<TProjectType extends ProjectType = ProjectType
sourceRoot: string; sourceRoot: string;
prefix: string; prefix: string;
cli?: { warnings?: Record<string, boolean> }; cli?: WorkspaceCLISchema;
/** /**
* Tool options. * Tool options.

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save