mirror of https://github.com/abpframework/abp.git
committed by
GitHub
143 changed files with 1091 additions and 4566 deletions
@ -1,4 +1,5 @@ |
|||
module.exports = { |
|||
/* eslint-disable */ |
|||
export default { |
|||
displayName: 'dev-app', |
|||
preset: '../../jest.preset.js', |
|||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], |
|||
@ -1,5 +0,0 @@ |
|||
const { getJestProjects } = require('@nrwl/jest'); |
|||
|
|||
module.exports = { |
|||
projects: getJestProjects(), |
|||
}; |
|||
@ -0,0 +1,5 @@ |
|||
import { getJestProjects } from '@nrwl/jest'; |
|||
|
|||
export default { |
|||
projects: getJestProjects(), |
|||
}; |
|||
@ -1,3 +1,3 @@ |
|||
const nxPreset = require('@nrwl/jest/preset'); |
|||
const nxPreset = require('@nrwl/jest/preset').default; |
|||
|
|||
module.exports = { ...nxPreset }; |
|||
|
|||
@ -1,84 +1,44 @@ |
|||
{ |
|||
"migrations": [ |
|||
{ |
|||
"version": "13.6.0-beta.0", |
|||
"description": "Remove old options that are no longer used", |
|||
"cli": "nx", |
|||
"implementation": "./src/migrations/update-13-6-0/remove-old-task-runner-options", |
|||
"package": "@nrwl/workspace", |
|||
"name": "13-6-0-remove-old-task-runner-options" |
|||
}, |
|||
{ |
|||
"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", |
|||
"version": "14.6.0-beta.0", |
|||
"description": "Update the @angular/cli package version to ~14.2.0.", |
|||
"factory": "./src/migrations/update-14-6-0/update-angular-cli", |
|||
"package": "@nrwl/angular", |
|||
"name": "fix-incorrect-mfe-setups" |
|||
"name": "update-angular-cli-version-14-2-0" |
|||
}, |
|||
{ |
|||
"cli": "nx", |
|||
"version": "13.8.1", |
|||
"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.", |
|||
"factory": "./src/migrations/update-13-8-1/add-cypress-mfe-workaround", |
|||
"package": "@nrwl/angular", |
|||
"name": "add-cypress-mfe-workaround" |
|||
"version": "14.6.1-beta.0", |
|||
"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-14-6-1/update-cypress-configs-presets", |
|||
"package": "@nrwl/cypress", |
|||
"name": "update-cypress-configs-preset" |
|||
}, |
|||
{ |
|||
"cli": "nx", |
|||
"version": "13.8.4", |
|||
"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.", |
|||
"factory": "./src/migrations/update-13-8-4/migrate-karma-conf", |
|||
"package": "@nrwl/angular", |
|||
"name": "migrate-karma-config" |
|||
"version": "14.7.0-beta.0", |
|||
"description": "Update Cypress if using v10 to support latest component testing features", |
|||
"factory": "./src/migrations/update-14-7-0/update-cypress-version-if-10", |
|||
"package": "@nrwl/cypress", |
|||
"name": "update-cypress-if-v10" |
|||
}, |
|||
{ |
|||
"version": "14.6.0-beta.0", |
|||
"cli": "nx", |
|||
"version": "13.9.0-beta.4", |
|||
"description": "Set buildLibsFromSource property to false to not break existing usage.", |
|||
"factory": "./src/migrations/update-13-9-0/set-build-libs-from-source", |
|||
"package": "@nrwl/angular", |
|||
"name": "set-build-libs-from-source" |
|||
"description": "Update jest configs to support jest 28 changes (https://jestjs.io/docs/upgrading-to-jest28#configuration-options)", |
|||
"factory": "./src/migrations/update-14-6-0/update-configs-jest-28", |
|||
"package": "@nrwl/jest", |
|||
"name": "update-configs-jest-28" |
|||
}, |
|||
{ |
|||
"version": "13.4.4-beta.0", |
|||
"version": "14.6.0-beta.0", |
|||
"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", |
|||
"factory": "./src/migrations/update-13-4-4/add-missing-root-babel-config", |
|||
"description": "Update jest test files to support jest 28 changes (https://jestjs.io/docs/upgrading-to-jest28)", |
|||
"factory": "./src/migrations/update-14-6-0/update-tests-jest-28", |
|||
"package": "@nrwl/jest", |
|||
"name": "add-missing-root-babel-config" |
|||
"name": "update-tests-jest-28" |
|||
} |
|||
] |
|||
} |
|||
|
|||
@ -1,4 +1,5 @@ |
|||
module.exports = { |
|||
/* eslint-disable */ |
|||
export default { |
|||
displayName: 'account-core', |
|||
preset: '../../jest.preset.js', |
|||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], |
|||
@ -1,4 +1,5 @@ |
|||
module.exports = { |
|||
/* eslint-disable */ |
|||
export default { |
|||
displayName: 'account', |
|||
preset: '../../jest.preset.js', |
|||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], |
|||
@ -1,4 +1,5 @@ |
|||
module.exports = { |
|||
/* eslint-disable */ |
|||
export default { |
|||
displayName: 'components', |
|||
preset: '../../jest.preset.js', |
|||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], |
|||
@ -1,4 +1,5 @@ |
|||
module.exports = { |
|||
/* eslint-disable */ |
|||
export default { |
|||
displayName: 'core', |
|||
preset: '../../jest.preset.js', |
|||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.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(); |
|||
} |
|||
} |
|||
@ -1,4 +1,5 @@ |
|||
module.exports = { |
|||
/* eslint-disable */ |
|||
export default { |
|||
displayName: 'feature-management', |
|||
preset: '../../jest.preset.js', |
|||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], |
|||
@ -1,4 +1,5 @@ |
|||
module.exports = { |
|||
/* eslint-disable */ |
|||
export default { |
|||
displayName: 'identity', |
|||
preset: '../../jest.preset.js', |
|||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], |
|||
@ -1,4 +1,5 @@ |
|||
module.exports = { |
|||
/* eslint-disable */ |
|||
export default { |
|||
displayName: 'permission-management', |
|||
preset: '../../jest.preset.js', |
|||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], |
|||
@ -1,4 +1,5 @@ |
|||
module.exports = { |
|||
/* eslint-disable */ |
|||
export default { |
|||
displayName: 'schematics', |
|||
preset: '../../jest.preset.js', |
|||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], |
|||
@ -1,5 +1,5 @@ |
|||
**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. |
|||
|
|||
@ -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); |
|||
} |
|||
}; |
|||
} |
|||
@ -1,20 +1,23 @@ |
|||
{ |
|||
"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, |
|||
"dependencies": { |
|||
"@types/jasmine": "~3.10.0", |
|||
"@types/node": "^12.11.1", |
|||
"jasmine-core": "~4.0.0", |
|||
"@types/jasmine": "~4.0.0", |
|||
"@types/node": "^14.15.0", |
|||
"jasmine-core": "~4.3.0", |
|||
"jasmine-spec-reporter": "~7.0.0", |
|||
"karma-chrome-launcher": "~3.1.0", |
|||
"karma-coverage": "~2.1.0", |
|||
"karma-jasmine-html-reporter": "~1.7.0", |
|||
"karma-jasmine": "~4.0.0", |
|||
"karma": "~6.3.0", |
|||
"ng-packagr": "^13.0.0", |
|||
"rxjs": "~6.6.7", |
|||
"karma-coverage": "~2.2.0", |
|||
"karma-jasmine-html-reporter": "~2.0.0", |
|||
"karma-jasmine": "~5.1.0", |
|||
"karma": "~6.4.0", |
|||
"ng-packagr": "^14.2.0", |
|||
"protractor": "~7.0.0", |
|||
"rxjs": "~7.5.0", |
|||
"tslib": "^2.3.0", |
|||
"typescript": "~4.6.2", |
|||
"ts-node": "~10.9.0", |
|||
"typescript": "~4.7.2", |
|||
"zone.js": "~0.11.4" |
|||
} |
|||
} |
|||
|
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue