knip 0.0.0-angular.0 → 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -244,7 +244,6 @@ This is especially useful over time when such configuration files change (and th
244
244
 
245
245
  Knip contains a growing list of plugins:
246
246
 
247
- - [Angular][plugin-angular]
248
247
  - [Ava][plugin-ava]
249
248
  - [Babel][plugin-babel]
250
249
  - [Capacitor][plugin-capacitor]
@@ -864,7 +863,6 @@ Special thanks to the wonderful people who have contributed to this project:
864
863
  [71]: https://www.joshuakgoldberg.com/blog/speeding-up-centered-part-4-unused-code-bloat/
865
864
  [72]: https://github.com/webpro/knip/graphs/contributors
866
865
  [73]: https://contrib.rocks/image?repo=webpro/knip
867
- [plugin-angular]: ./src/plugins/angular
868
866
  [plugin-ava]: ./src/plugins/ava
869
867
  [plugin-babel]: ./src/plugins/babel
870
868
  [plugin-capacitor]: ./src/plugins/capacitor
@@ -21,19 +21,6 @@ export declare const ConfigurationValidator: z.ZodObject<{
21
21
  ignore: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
22
22
  ignoreBinaries: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
23
23
  ignoreDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
24
- angular: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
25
- config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
26
- entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
27
- project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
28
- }, "strip", z.ZodTypeAny, {
29
- config?: string | string[] | undefined;
30
- entry?: string | string[] | undefined;
31
- project?: string | string[] | undefined;
32
- }, {
33
- config?: string | string[] | undefined;
34
- entry?: string | string[] | undefined;
35
- project?: string | string[] | undefined;
36
- }>]>>;
37
24
  ava: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
38
25
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
39
26
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -548,11 +535,6 @@ export declare const ConfigurationValidator: z.ZodObject<{
548
535
  ignore?: string | string[] | undefined;
549
536
  ignoreBinaries?: string[] | undefined;
550
537
  ignoreDependencies?: string[] | undefined;
551
- angular?: string | false | string[] | {
552
- config?: string | string[] | undefined;
553
- entry?: string | string[] | undefined;
554
- project?: string | string[] | undefined;
555
- } | undefined;
556
538
  ava?: string | false | string[] | {
557
539
  config?: string | string[] | undefined;
558
540
  entry?: string | string[] | undefined;
@@ -755,11 +737,6 @@ export declare const ConfigurationValidator: z.ZodObject<{
755
737
  ignore?: string | string[] | undefined;
756
738
  ignoreBinaries?: string[] | undefined;
757
739
  ignoreDependencies?: string[] | undefined;
758
- angular?: string | false | string[] | {
759
- config?: string | string[] | undefined;
760
- entry?: string | string[] | undefined;
761
- project?: string | string[] | undefined;
762
- } | undefined;
763
740
  ava?: string | false | string[] | {
764
741
  config?: string | string[] | undefined;
765
742
  entry?: string | string[] | undefined;
@@ -956,19 +933,6 @@ export declare const ConfigurationValidator: z.ZodObject<{
956
933
  project?: string | string[] | undefined;
957
934
  } | undefined;
958
935
  }>>>;
959
- angular: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
960
- config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
961
- entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
962
- project: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
963
- }, "strip", z.ZodTypeAny, {
964
- config?: string | string[] | undefined;
965
- entry?: string | string[] | undefined;
966
- project?: string | string[] | undefined;
967
- }, {
968
- config?: string | string[] | undefined;
969
- entry?: string | string[] | undefined;
970
- project?: string | string[] | undefined;
971
- }>]>>;
972
936
  ava: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
973
937
  config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
974
938
  entry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
@@ -1498,11 +1462,6 @@ export declare const ConfigurationValidator: z.ZodObject<{
1498
1462
  ignore?: string | string[] | undefined;
1499
1463
  ignoreBinaries?: string[] | undefined;
1500
1464
  ignoreDependencies?: string[] | undefined;
1501
- angular?: string | false | string[] | {
1502
- config?: string | string[] | undefined;
1503
- entry?: string | string[] | undefined;
1504
- project?: string | string[] | undefined;
1505
- } | undefined;
1506
1465
  ava?: string | false | string[] | {
1507
1466
  config?: string | string[] | undefined;
1508
1467
  entry?: string | string[] | undefined;
@@ -1699,11 +1658,6 @@ export declare const ConfigurationValidator: z.ZodObject<{
1699
1658
  project?: string | string[] | undefined;
1700
1659
  } | undefined;
1701
1660
  }> | undefined;
1702
- angular?: string | false | string[] | {
1703
- config?: string | string[] | undefined;
1704
- entry?: string | string[] | undefined;
1705
- project?: string | string[] | undefined;
1706
- } | undefined;
1707
1661
  ava?: string | false | string[] | {
1708
1662
  config?: string | string[] | undefined;
1709
1663
  entry?: string | string[] | undefined;
@@ -1921,11 +1875,6 @@ export declare const ConfigurationValidator: z.ZodObject<{
1921
1875
  ignore?: string | string[] | undefined;
1922
1876
  ignoreBinaries?: string[] | undefined;
1923
1877
  ignoreDependencies?: string[] | undefined;
1924
- angular?: string | false | string[] | {
1925
- config?: string | string[] | undefined;
1926
- entry?: string | string[] | undefined;
1927
- project?: string | string[] | undefined;
1928
- } | undefined;
1929
1878
  ava?: string | false | string[] | {
1930
1879
  config?: string | string[] | undefined;
1931
1880
  entry?: string | string[] | undefined;
@@ -2122,11 +2071,6 @@ export declare const ConfigurationValidator: z.ZodObject<{
2122
2071
  project?: string | string[] | undefined;
2123
2072
  } | undefined;
2124
2073
  }> | undefined;
2125
- angular?: string | false | string[] | {
2126
- config?: string | string[] | undefined;
2127
- entry?: string | string[] | undefined;
2128
- project?: string | string[] | undefined;
2129
- } | undefined;
2130
2074
  ava?: string | false | string[] | {
2131
2075
  config?: string | string[] | undefined;
2132
2076
  entry?: string | string[] | undefined;
@@ -60,7 +60,6 @@ const pluginSchema = z.union([
60
60
  }),
61
61
  ]);
62
62
  const pluginsSchema = z.object({
63
- angular: pluginSchema,
64
63
  ava: pluginSchema,
65
64
  babel: pluginSchema,
66
65
  capacitor: pluginSchema,
@@ -50,7 +50,7 @@ export declare class WorkspaceWorker {
50
50
  peerDependencies: PeerDependencies;
51
51
  installedBinaries: InstalledBinaries;
52
52
  referencedDependencies: ReferencedDependencies;
53
- enabledPlugins: ("angular" | "ava" | "babel" | "capacitor" | "changesets" | "commitizen" | "commitlint" | "cspell" | "cypress" | "eslint" | "gatsby" | "husky" | "jest" | "lefthook" | "markdownlint" | "mocha" | "next" | "nx" | "nyc" | "playwright" | "postcss" | "prettier" | "remark" | "remix" | "rollup" | "sentry" | "storybook" | "stryker" | "stylelint" | "tailwind" | "typedoc" | "typescript" | "vite" | "vitest" | "webpack" | "githubActions" | "lintStaged" | "npmPackageJsonLint" | "releaseIt" | "semanticRelease" | "svelte")[];
53
+ enabledPlugins: ("ava" | "babel" | "capacitor" | "changesets" | "commitizen" | "commitlint" | "cspell" | "cypress" | "eslint" | "gatsby" | "husky" | "jest" | "lefthook" | "markdownlint" | "mocha" | "next" | "nx" | "nyc" | "playwright" | "postcss" | "prettier" | "remark" | "remix" | "rollup" | "sentry" | "storybook" | "stryker" | "stylelint" | "tailwind" | "typedoc" | "typescript" | "vite" | "vitest" | "webpack" | "githubActions" | "lintStaged" | "npmPackageJsonLint" | "releaseIt" | "semanticRelease" | "svelte")[];
54
54
  }>;
55
55
  }
56
56
  export {};
@@ -1,4 +1,3 @@
1
- export * as angular from './angular/index.js';
2
1
  export * as ava from './ava/index.js';
3
2
  export * as babel from './babel/index.js';
4
3
  export * as capacitor from './capacitor/index.js';
@@ -1,4 +1,3 @@
1
- export * as angular from './angular/index.js';
2
1
  export * as ava from './ava/index.js';
3
2
  export * as babel from './babel/index.js';
4
3
  export * as capacitor from './capacitor/index.js';
@@ -3,5 +3,4 @@ export declare const NAME = "TypeScript";
3
3
  export declare const ENABLERS: string[];
4
4
  export declare const isEnabled: IsPluginEnabledCallback;
5
5
  export declare const CONFIG_FILE_PATTERNS: string[];
6
- export declare const findTypeScriptDependencies: GenericPluginCallback;
7
6
  export declare const findDependencies: GenericPluginCallback;
@@ -21,7 +21,7 @@ const resolveExtensibleConfig = async (configFilePath) => {
21
21
  }
22
22
  return config;
23
23
  };
24
- export const findTypeScriptDependencies = async (configFilePath) => {
24
+ const findTypeScriptDependencies = async (configFilePath) => {
25
25
  const compilerOptions = await loadTSConfig(configFilePath);
26
26
  const config = await resolveExtensibleConfig(configFilePath);
27
27
  if (!compilerOptions || !config)
@@ -10,7 +10,8 @@ export declare function isDefaultImport(node: ts.ImportDeclaration | ts.ImportEq
10
10
  export declare function isAccessExpression(node: ts.Node): node is ts.PropertyAccessExpression | ts.ElementAccessExpression;
11
11
  export declare function isImportCall(node: ts.Node): node is ts.ImportCall;
12
12
  export declare function isRequireCall(callExpression: ts.Node): callExpression is ts.CallExpression;
13
- export declare function isRequireResolveCall(node: ts.Node): node is ts.CallExpression;
13
+ export declare function isPropertyAccessCall(node: ts.Node, identifier: string): node is ts.CallExpression;
14
+ export declare function isConstructorCall(node: ts.Node, identifier: string): node is ts.CallExpression;
14
15
  export declare function getAccessExpressionName(node: ts.PropertyAccessExpression | ts.ElementAccessExpression): string;
15
16
  type LiteralLikeElementAccessExpression = ts.ElementAccessExpression & ts.Declaration & {
16
17
  readonly argumentExpression: ts.StringLiteralLike | ts.NumericLiteral;
@@ -25,10 +25,13 @@ export function isRequireCall(callExpression) {
25
25
  }
26
26
  return args.length === 1;
27
27
  }
28
- export function isRequireResolveCall(node) {
28
+ export function isPropertyAccessCall(node, identifier) {
29
29
  return (ts.isCallExpression(node) &&
30
30
  ts.isPropertyAccessExpression(node.expression) &&
31
- node.expression.getText() === 'require.resolve');
31
+ node.expression.getText() === identifier);
32
+ }
33
+ export function isConstructorCall(node, identifier) {
34
+ return ts.isNewExpression(node) && node.expression.getText() === identifier;
32
35
  }
33
36
  export function getAccessExpressionName(node) {
34
37
  return 'argumentExpression' in node ? stripQuotes(node.argumentExpression.getText()) : node.name.getText();
@@ -1,4 +1,6 @@
1
+ import { existsSync } from 'node:fs';
1
2
  import { isBuiltin } from 'node:module';
3
+ import { resolve, dirname } from 'node:path';
2
4
  import ts from 'typescript';
3
5
  import { getOrSet } from '../util/map.js';
4
6
  import { isMaybePackageName } from '../util/modules.js';
@@ -73,7 +75,13 @@ export const getImportsAndExports = (sourceFile, options) => {
73
75
  }
74
76
  }
75
77
  else {
76
- unresolvedImports.add(specifier);
78
+ const filePath = resolve(dirname(sourceFile.fileName), specifier);
79
+ if (existsSync(filePath)) {
80
+ unresolvedImports.add(filePath);
81
+ }
82
+ else {
83
+ unresolvedImports.add(specifier);
84
+ }
77
85
  }
78
86
  };
79
87
  const maybeAddNamespaceAccessAsImport = ({ namespace, member }) => {
@@ -0,0 +1,15 @@
1
+ import ts from 'typescript';
2
+ import { isConstructorCall } from '../../ast-helpers.js';
3
+ import { importVisitor as visit } from '../index.js';
4
+ export default visit(() => true, node => {
5
+ if (isConstructorCall(node, 'URL')) {
6
+ if (node.arguments.length === 2 &&
7
+ ts.isStringLiteralLike(node.arguments[0]) &&
8
+ ts.isPropertyAccessExpression(node.arguments[1]) &&
9
+ node.arguments[1].getText() === 'import.meta.url') {
10
+ const specifier = node.arguments[0].text;
11
+ if (specifier)
12
+ return { specifier };
13
+ }
14
+ }
15
+ });
@@ -1,18 +1,20 @@
1
1
  import ts from 'typescript';
2
+ import constructorCall from './constructorCall.js';
2
3
  import importCall from './importCall.js';
3
4
  import importDeclaration from './importDeclaration.js';
4
5
  import importEqualsDeclaration from './importEqualsDeclaration.js';
5
6
  import jsDocType from './jsDocType.js';
7
+ import propertyAccessCall from './propertyAccessCall.js';
6
8
  import reExportDeclaration from './reExportDeclaration.js';
7
9
  import requireCall from './requireCall.js';
8
- import requireResolveCall from './requireResolveCall.js';
9
10
  const visitors = [
11
+ constructorCall,
10
12
  importCall,
11
13
  importDeclaration,
12
14
  importEqualsDeclaration,
13
15
  jsDocType,
16
+ propertyAccessCall,
14
17
  reExportDeclaration,
15
18
  requireCall,
16
- requireResolveCall,
17
19
  ];
18
20
  export default (sourceFile) => visitors.map(v => v(sourceFile));
@@ -0,0 +1,3 @@
1
+ import ts from 'typescript';
2
+ declare const _default: (sourceFile: ts.SourceFile) => ((node: ts.Node, options: import("../../getImportsAndExports.js").GetImportsAndExportsOptions) => import("../../getImportsAndExports.js").AddImportOptions | import("../../getImportsAndExports.js").AddImportOptions[] | undefined) | undefined;
3
+ export default _default;
@@ -1,8 +1,8 @@
1
1
  import ts from 'typescript';
2
- import { isRequireResolveCall } from '../../ast-helpers.js';
2
+ import { isPropertyAccessCall } from '../../ast-helpers.js';
3
3
  import { importVisitor as visit } from '../index.js';
4
4
  export default visit(() => true, node => {
5
- if (isRequireResolveCall(node)) {
5
+ if (isPropertyAccessCall(node, 'require.resolve')) {
6
6
  if (node.arguments[0] && ts.isStringLiteralLike(node.arguments[0])) {
7
7
  const specifier = node.arguments[0].text;
8
8
  if (specifier)
@@ -22,11 +22,6 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
22
22
  ignore?: string | string[] | undefined;
23
23
  ignoreBinaries?: string[] | undefined;
24
24
  ignoreDependencies?: string[] | undefined;
25
- angular?: string | false | string[] | {
26
- config?: string | string[] | undefined;
27
- entry?: string | string[] | undefined;
28
- project?: string | string[] | undefined;
29
- } | undefined;
30
25
  ava?: string | false | string[] | {
31
26
  config?: string | string[] | undefined;
32
27
  entry?: string | string[] | undefined;
@@ -223,11 +218,6 @@ export declare const partitionCompilers: (rawLocalConfig: RawConfiguration) => {
223
218
  project?: string | string[] | undefined;
224
219
  } | undefined;
225
220
  }> | undefined;
226
- angular?: string | false | string[] | {
227
- config?: string | string[] | undefined;
228
- entry?: string | string[] | undefined;
229
- project?: string | string[] | undefined;
230
- } | undefined;
231
221
  ava?: string | false | string[] | {
232
222
  config?: string | string[] | undefined;
233
223
  entry?: string | string[] | undefined;
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "0.0.0-angular.0";
1
+ export declare const version = "2.24.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '0.0.0-angular.0';
1
+ export const version = '2.24.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "0.0.0-angular.0",
3
+ "version": "0.0.0",
4
4
  "description": "Find unused files, dependencies and exports in your TypeScript and JavaScript projects",
5
5
  "homepage": "https://github.com/webpro/knip",
6
6
  "repository": "github:webpro/knip",
package/schema.json CHANGED
@@ -220,10 +220,6 @@
220
220
  },
221
221
  "plugins": {
222
222
  "properties": {
223
- "angular": {
224
- "title": "angular plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/angular/README.md)",
225
- "$ref": "#/definitions/plugin"
226
- },
227
223
  "ava": {
228
224
  "title": "ava plugin configuration (https://github.com/webpro/knip/blob/main/src/plugins/ava/README.md)",
229
225
  "$ref": "#/definitions/plugin"
@@ -1,6 +0,0 @@
1
- import type { IsPluginEnabledCallback, GenericPluginCallback } from '../../types/plugins.js';
2
- export declare const NAME = "Angular";
3
- export declare const ENABLERS: string[];
4
- export declare const isEnabled: IsPluginEnabledCallback;
5
- export declare const CONFIG_FILE_PATTERNS: string[];
6
- export declare const findDependencies: GenericPluginCallback;
@@ -1,36 +0,0 @@
1
- import { join } from '../../util/path.js';
2
- import { timerify } from '../../util/Performance.js';
3
- import { hasDependency, load } from '../../util/plugin.js';
4
- import { findTypeScriptDependencies } from '../typescript/index.js';
5
- export const NAME = 'Angular';
6
- export const ENABLERS = ['@angular/cli'];
7
- export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
8
- export const CONFIG_FILE_PATTERNS = ['angular.json'];
9
- const findPluginDependencies = async (configFilePath, opts) => {
10
- const { cwd } = opts;
11
- const config = await load(configFilePath);
12
- if (!config.projects)
13
- return [];
14
- const dependencies = new Set();
15
- for (const project of Object.values(config.projects)) {
16
- if (!project.architect)
17
- return [];
18
- for (const target of Object.values(project.architect)) {
19
- const { options } = target;
20
- const [packageName] = typeof target.builder === 'string' ? target.builder.split(':') : [];
21
- if (typeof packageName === 'string')
22
- dependencies.add(packageName);
23
- if (options) {
24
- if ('main' in options && typeof options?.main === 'string') {
25
- dependencies.add(join(cwd, options.main));
26
- }
27
- if ('tsConfig' in options && typeof options.tsConfig === 'string') {
28
- const tsConfigDependencies = await findTypeScriptDependencies(join(cwd, options.tsConfig), opts);
29
- tsConfigDependencies.forEach(dependency => dependencies.add(dependency));
30
- }
31
- }
32
- }
33
- }
34
- return Array.from(dependencies);
35
- };
36
- export const findDependencies = timerify(findPluginDependencies);
@@ -1,745 +0,0 @@
1
- type FileVersion = number;
2
- type Project = Project1 & {
3
- cli?: {
4
- [k: string]: unknown;
5
- };
6
- schematics?: SchematicOptions;
7
- prefix?: string;
8
- root: string;
9
- i18n?: I18N;
10
- sourceRoot?: string;
11
- projectType: 'application' | 'library';
12
- architect?: {
13
- [k: string]: {
14
- builder: string;
15
- defaultConfiguration?: string;
16
- options?: {
17
- [k: string]: unknown;
18
- };
19
- configurations?: {
20
- [k: string]: {
21
- [k: string]: unknown;
22
- };
23
- };
24
- } | {
25
- builder?: '@angular-devkit/build-angular:app-shell';
26
- defaultConfiguration?: string;
27
- options?: AppShellTarget;
28
- configurations?: {
29
- [k: string]: AppShellTarget;
30
- };
31
- } | {
32
- builder?: '@angular-devkit/build-angular:browser';
33
- defaultConfiguration?: string;
34
- options?: WebpackBrowserSchemaForBuildFacade;
35
- configurations?: {
36
- [k: string]: WebpackBrowserSchemaForBuildFacade;
37
- };
38
- } | {
39
- builder?: '@angular-devkit/build-angular:browser-esbuild';
40
- defaultConfiguration?: string;
41
- options?: EsbuildBrowserSchemaForBuildFacade;
42
- configurations?: {
43
- [k: string]: EsbuildBrowserSchemaForBuildFacade;
44
- };
45
- } | {
46
- builder?: '@angular-devkit/build-angular:dev-server';
47
- defaultConfiguration?: string;
48
- options?: DevServerTarget;
49
- configurations?: {
50
- [k: string]: DevServerTarget;
51
- };
52
- } | {
53
- builder?: '@angular-devkit/build-angular:extract-i18n';
54
- defaultConfiguration?: string;
55
- options?: ExtractI18NTarget;
56
- configurations?: {
57
- [k: string]: ExtractI18NTarget;
58
- };
59
- } | {
60
- builder?: '@angular-devkit/build-angular:karma';
61
- defaultConfiguration?: string;
62
- options?: KarmaTarget;
63
- configurations?: {
64
- [k: string]: KarmaTarget;
65
- };
66
- } | {
67
- builder?: '@angular-devkit/build-angular:jest';
68
- defaultConfiguration?: string;
69
- options?: JestBrowserSchemaForBuildFacade;
70
- configurations?: {
71
- [k: string]: JestBrowserSchemaForBuildFacade;
72
- };
73
- } | {
74
- builder?: '@angular-devkit/build-angular:protractor';
75
- defaultConfiguration?: string;
76
- options?: ProtractorTarget;
77
- configurations?: {
78
- [k: string]: ProtractorTarget;
79
- };
80
- } | {
81
- builder?: '@angular-devkit/build-angular:server';
82
- defaultConfiguration?: string;
83
- options?: UniversalTarget;
84
- configurations?: {
85
- [k: string]: UniversalTarget;
86
- };
87
- } | {
88
- builder?: '@angular-devkit/build-angular:ng-packagr';
89
- defaultConfiguration?: string;
90
- options?: NgPackagrTarget;
91
- configurations?: {
92
- [k: string]: NgPackagrTarget;
93
- };
94
- };
95
- };
96
- targets?: {
97
- [k: string]: {
98
- builder: string;
99
- defaultConfiguration?: string;
100
- options?: {
101
- [k: string]: unknown;
102
- };
103
- configurations?: {
104
- [k: string]: {
105
- [k: string]: unknown;
106
- };
107
- };
108
- } | {
109
- builder?: '@angular-devkit/build-angular:app-shell';
110
- defaultConfiguration?: string;
111
- options?: AppShellTarget;
112
- configurations?: {
113
- [k: string]: AppShellTarget;
114
- };
115
- } | {
116
- builder?: '@angular-devkit/build-angular:browser';
117
- defaultConfiguration?: string;
118
- options?: WebpackBrowserSchemaForBuildFacade;
119
- configurations?: {
120
- [k: string]: WebpackBrowserSchemaForBuildFacade;
121
- };
122
- } | {
123
- builder?: '@angular-devkit/build-angular:browser-esbuild';
124
- defaultConfiguration?: string;
125
- options?: EsbuildBrowserSchemaForBuildFacade;
126
- configurations?: {
127
- [k: string]: EsbuildBrowserSchemaForBuildFacade;
128
- };
129
- } | {
130
- builder?: '@angular-devkit/build-angular:dev-server';
131
- defaultConfiguration?: string;
132
- options?: DevServerTarget;
133
- configurations?: {
134
- [k: string]: DevServerTarget;
135
- };
136
- } | {
137
- builder?: '@angular-devkit/build-angular:extract-i18n';
138
- defaultConfiguration?: string;
139
- options?: ExtractI18NTarget;
140
- configurations?: {
141
- [k: string]: ExtractI18NTarget;
142
- };
143
- } | {
144
- builder?: '@angular-devkit/build-angular:karma';
145
- defaultConfiguration?: string;
146
- options?: KarmaTarget;
147
- configurations?: {
148
- [k: string]: KarmaTarget;
149
- };
150
- } | {
151
- builder?: '@angular-devkit/build-angular:jest';
152
- defaultConfiguration?: string;
153
- options?: JestBrowserSchemaForBuildFacade;
154
- configurations?: {
155
- [k: string]: JestBrowserSchemaForBuildFacade;
156
- };
157
- } | {
158
- builder?: '@angular-devkit/build-angular:protractor';
159
- defaultConfiguration?: string;
160
- options?: ProtractorTarget;
161
- configurations?: {
162
- [k: string]: ProtractorTarget;
163
- };
164
- } | {
165
- builder?: '@angular-devkit/build-angular:server';
166
- defaultConfiguration?: string;
167
- options?: UniversalTarget;
168
- configurations?: {
169
- [k: string]: UniversalTarget;
170
- };
171
- } | {
172
- builder?: '@angular-devkit/build-angular:ng-packagr';
173
- defaultConfiguration?: string;
174
- options?: NgPackagrTarget;
175
- configurations?: {
176
- [k: string]: NgPackagrTarget;
177
- };
178
- };
179
- };
180
- [k: string]: unknown;
181
- };
182
- type Project1 = {
183
- [k: string]: unknown;
184
- };
185
- export interface AngularCLIWorkspaceConfiguration {
186
- $schema?: string;
187
- version: FileVersion;
188
- cli?: CliOptions;
189
- schematics?: SchematicOptions;
190
- newProjectRoot?: string;
191
- projects?: {
192
- [k: string]: Project;
193
- };
194
- }
195
- interface CliOptions {
196
- schematicCollections?: string[];
197
- packageManager?: 'npm' | 'cnpm' | 'yarn' | 'pnpm';
198
- warnings?: {
199
- versionMismatch?: boolean;
200
- };
201
- analytics?: boolean | string;
202
- cache?: {
203
- environment?: 'local' | 'ci' | 'all';
204
- enabled?: boolean;
205
- path?: string;
206
- };
207
- }
208
- interface SchematicOptions {
209
- '@schematics/angular:application'?: AngularApplicationOptionsSchema;
210
- '@schematics/angular:class'?: AngularClassOptionsSchema;
211
- '@schematics/angular:component'?: AngularComponentOptionsSchema;
212
- '@schematics/angular:directive'?: AngularDirectiveOptionsSchema;
213
- '@schematics/angular:enum'?: AngularEnumOptionsSchema;
214
- '@schematics/angular:guard'?: AngularGuardOptionsSchema;
215
- '@schematics/angular:interceptor'?: AngularInterceptorOptionsSchema;
216
- '@schematics/angular:interface'?: AngularInterfaceOptionsSchema;
217
- '@schematics/angular:library'?: LibraryOptionsSchema;
218
- '@schematics/angular:pipe'?: AngularPipeOptionsSchema;
219
- '@schematics/angular:ng-new'?: AngularNgNewOptionsSchema;
220
- '@schematics/angular:resolver'?: AngularResolverOptionsSchema;
221
- '@schematics/angular:service'?: AngularServiceOptionsSchema;
222
- '@schematics/angular:web-worker'?: AngularWebWorkerOptionsSchema;
223
- [k: string]: unknown;
224
- }
225
- interface AngularApplicationOptionsSchema {
226
- projectRoot?: string;
227
- name?: string;
228
- inlineStyle?: boolean;
229
- inlineTemplate?: boolean;
230
- viewEncapsulation?: 'Emulated' | 'None' | 'ShadowDom';
231
- routing?: boolean;
232
- prefix?: string;
233
- style?: 'css' | 'scss' | 'sass' | 'less';
234
- skipTests?: boolean;
235
- skipPackageJson?: boolean;
236
- minimal?: boolean;
237
- skipInstall?: boolean;
238
- strict?: boolean;
239
- standalone?: boolean;
240
- }
241
- interface AngularClassOptionsSchema {
242
- name?: string;
243
- path?: string;
244
- project?: string;
245
- skipTests?: boolean;
246
- type?: string;
247
- }
248
- interface AngularComponentOptionsSchema {
249
- path?: string;
250
- project?: string;
251
- name?: string;
252
- displayBlock?: boolean;
253
- inlineStyle?: boolean;
254
- inlineTemplate?: boolean;
255
- standalone?: boolean;
256
- viewEncapsulation?: 'Emulated' | 'None' | 'ShadowDom';
257
- changeDetection?: 'Default' | 'OnPush';
258
- prefix?: {
259
- [k: string]: unknown;
260
- } & string;
261
- style?: 'css' | 'scss' | 'sass' | 'less' | 'none';
262
- type?: string;
263
- skipTests?: boolean;
264
- flat?: boolean;
265
- skipImport?: boolean;
266
- selector?: string;
267
- skipSelector?: boolean;
268
- module?: string;
269
- export?: boolean;
270
- }
271
- interface AngularDirectiveOptionsSchema {
272
- name?: string;
273
- path?: string;
274
- project?: string;
275
- prefix?: {
276
- [k: string]: unknown;
277
- } & string;
278
- skipTests?: boolean;
279
- skipImport?: boolean;
280
- selector?: string;
281
- standalone?: boolean;
282
- flat?: boolean;
283
- module?: string;
284
- export?: boolean;
285
- }
286
- interface AngularEnumOptionsSchema {
287
- name?: string;
288
- path?: string;
289
- project?: string;
290
- type?: string;
291
- }
292
- interface AngularGuardOptionsSchema {
293
- name?: string;
294
- skipTests?: boolean;
295
- flat?: boolean;
296
- path?: string;
297
- project?: string;
298
- functional?: boolean;
299
- implements?: [
300
- 'CanActivate' | 'CanActivateChild' | 'CanDeactivate' | 'CanMatch',
301
- ...('CanActivate' | 'CanActivateChild' | 'CanDeactivate' | 'CanMatch')[]
302
- ];
303
- }
304
- interface AngularInterceptorOptionsSchema {
305
- name?: string;
306
- path?: string;
307
- project?: string;
308
- flat?: boolean;
309
- skipTests?: boolean;
310
- functional?: boolean;
311
- }
312
- interface AngularInterfaceOptionsSchema {
313
- name?: string;
314
- path?: string;
315
- project?: string;
316
- prefix?: string;
317
- type?: string;
318
- }
319
- interface LibraryOptionsSchema {
320
- name?: string;
321
- entryFile?: string;
322
- prefix?: string;
323
- skipPackageJson?: boolean;
324
- skipInstall?: boolean;
325
- skipTsConfig?: boolean;
326
- projectRoot?: string;
327
- standalone?: boolean;
328
- }
329
- interface AngularPipeOptionsSchema {
330
- name?: string;
331
- path?: string;
332
- project?: string;
333
- flat?: boolean;
334
- skipTests?: boolean;
335
- skipImport?: boolean;
336
- standalone?: boolean;
337
- module?: string;
338
- export?: boolean;
339
- }
340
- interface AngularNgNewOptionsSchema {
341
- directory?: string;
342
- name?: string;
343
- skipInstall?: boolean;
344
- linkCli?: boolean;
345
- skipGit?: boolean;
346
- commit?: boolean | {
347
- name?: string;
348
- email?: string;
349
- message?: string;
350
- [k: string]: unknown;
351
- };
352
- newProjectRoot?: string;
353
- inlineStyle?: boolean;
354
- inlineTemplate?: boolean;
355
- viewEncapsulation?: 'Emulated' | 'None' | 'ShadowDom';
356
- version?: string;
357
- routing?: boolean;
358
- prefix?: string;
359
- style?: 'css' | 'scss' | 'sass' | 'less';
360
- skipTests?: boolean;
361
- createApplication?: boolean;
362
- minimal?: boolean;
363
- strict?: boolean;
364
- packageManager?: 'npm' | 'yarn' | 'pnpm' | 'cnpm';
365
- standalone?: boolean;
366
- }
367
- interface AngularResolverOptionsSchema {
368
- name?: string;
369
- skipTests?: boolean;
370
- flat?: boolean;
371
- functional?: boolean;
372
- path?: string;
373
- project?: string;
374
- }
375
- interface AngularServiceOptionsSchema {
376
- name?: string;
377
- path?: string;
378
- project?: string;
379
- flat?: boolean;
380
- skipTests?: boolean;
381
- }
382
- interface AngularWebWorkerOptionsSchema {
383
- path?: string;
384
- project?: string;
385
- name?: string;
386
- snippet?: boolean;
387
- }
388
- interface I18N {
389
- sourceLocale?: string | {
390
- code?: string;
391
- baseHref?: string;
392
- };
393
- locales?: {
394
- [k: string]: string | string[] | {
395
- translation?: string | string[];
396
- baseHref?: string;
397
- };
398
- };
399
- }
400
- interface AppShellTarget {
401
- browserTarget?: string;
402
- serverTarget?: string;
403
- appModuleBundle?: string;
404
- route?: string;
405
- inputIndexPath?: string;
406
- outputIndexPath?: string;
407
- }
408
- interface WebpackBrowserSchemaForBuildFacade {
409
- assets?: ({
410
- followSymlinks?: boolean;
411
- glob?: string;
412
- input?: string;
413
- ignore?: string[];
414
- output?: string;
415
- } | string)[];
416
- main?: string;
417
- polyfills?: string[] | string;
418
- tsConfig?: string;
419
- scripts?: ({
420
- input?: string;
421
- bundleName?: string;
422
- inject?: boolean;
423
- } | string)[];
424
- styles?: ({
425
- input?: string;
426
- bundleName?: string;
427
- inject?: boolean;
428
- } | string)[];
429
- inlineStyleLanguage?: 'css' | 'less' | 'sass' | 'scss';
430
- stylePreprocessorOptions?: {
431
- includePaths?: string[];
432
- };
433
- optimization?: {
434
- scripts?: boolean;
435
- styles?: {
436
- minify?: boolean;
437
- inlineCritical?: boolean;
438
- } | boolean;
439
- fonts?: {
440
- inline?: boolean;
441
- } | boolean;
442
- } | boolean;
443
- fileReplacements?: ({
444
- src?: string;
445
- replaceWith?: string;
446
- } | {
447
- replace?: string;
448
- with?: string;
449
- })[];
450
- outputPath?: string;
451
- resourcesOutputPath?: string;
452
- aot?: boolean;
453
- sourceMap?: {
454
- scripts?: boolean;
455
- styles?: boolean;
456
- hidden?: boolean;
457
- vendor?: boolean;
458
- } | boolean;
459
- vendorChunk?: boolean;
460
- commonChunk?: boolean;
461
- baseHref?: string;
462
- deployUrl?: string;
463
- verbose?: boolean;
464
- progress?: boolean;
465
- i18nMissingTranslation?: 'warning' | 'error' | 'ignore';
466
- i18nDuplicateTranslation?: 'warning' | 'error' | 'ignore';
467
- localize?: boolean | [string, ...string[]];
468
- watch?: boolean;
469
- outputHashing?: 'none' | 'all' | 'media' | 'bundles';
470
- poll?: number;
471
- deleteOutputPath?: boolean;
472
- preserveSymlinks?: boolean;
473
- extractLicenses?: boolean;
474
- buildOptimizer?: boolean;
475
- namedChunks?: boolean;
476
- subresourceIntegrity?: boolean;
477
- serviceWorker?: boolean;
478
- ngswConfigPath?: string;
479
- index?: string | {
480
- input?: string;
481
- output?: string;
482
- [k: string]: unknown;
483
- };
484
- statsJson?: boolean;
485
- budgets?: Budget[];
486
- webWorkerTsConfig?: string;
487
- crossOrigin?: 'none' | 'anonymous' | 'use-credentials';
488
- allowedCommonJsDependencies?: string[];
489
- }
490
- interface Budget {
491
- type?: 'all' | 'allScript' | 'any' | 'anyScript' | 'anyComponentStyle' | 'bundle' | 'initial';
492
- name?: string;
493
- baseline?: string;
494
- maximumWarning?: string;
495
- maximumError?: string;
496
- minimumWarning?: string;
497
- minimumError?: string;
498
- warning?: string;
499
- error?: string;
500
- }
501
- interface EsbuildBrowserSchemaForBuildFacade {
502
- assets?: ({
503
- followSymlinks?: boolean;
504
- glob?: string;
505
- input?: string;
506
- ignore?: string[];
507
- output?: string;
508
- } | string)[];
509
- main?: string;
510
- polyfills?: string[] | string;
511
- tsConfig?: string;
512
- scripts?: ({
513
- input?: string;
514
- bundleName?: string;
515
- inject?: boolean;
516
- } | string)[];
517
- styles?: ({
518
- input?: string;
519
- bundleName?: string;
520
- inject?: boolean;
521
- } | string)[];
522
- inlineStyleLanguage?: 'css' | 'less' | 'sass' | 'scss';
523
- stylePreprocessorOptions?: {
524
- includePaths?: string[];
525
- };
526
- externalDependencies?: string[];
527
- optimization?: {
528
- scripts?: boolean;
529
- styles?: {
530
- minify?: boolean;
531
- inlineCritical?: boolean;
532
- } | boolean;
533
- fonts?: {
534
- inline?: boolean;
535
- } | boolean;
536
- } | boolean;
537
- fileReplacements?: FileReplacement[];
538
- outputPath?: string;
539
- resourcesOutputPath?: string;
540
- aot?: boolean;
541
- sourceMap?: {
542
- scripts?: boolean;
543
- styles?: boolean;
544
- hidden?: boolean;
545
- vendor?: boolean;
546
- } | boolean;
547
- vendorChunk?: boolean;
548
- commonChunk?: boolean;
549
- baseHref?: string;
550
- deployUrl?: string;
551
- verbose?: boolean;
552
- progress?: boolean;
553
- i18nMissingTranslation?: 'warning' | 'error' | 'ignore';
554
- i18nDuplicateTranslation?: 'warning' | 'error' | 'ignore';
555
- localize?: boolean | [string, ...string[]];
556
- watch?: boolean;
557
- outputHashing?: 'none' | 'all' | 'media' | 'bundles';
558
- poll?: number;
559
- deleteOutputPath?: boolean;
560
- preserveSymlinks?: boolean;
561
- extractLicenses?: boolean;
562
- buildOptimizer?: boolean;
563
- namedChunks?: boolean;
564
- subresourceIntegrity?: boolean;
565
- serviceWorker?: boolean;
566
- ngswConfigPath?: string;
567
- index?: string | {
568
- input?: string;
569
- output?: string;
570
- [k: string]: unknown;
571
- } | false;
572
- statsJson?: boolean;
573
- budgets?: Budget1[];
574
- webWorkerTsConfig?: string;
575
- crossOrigin?: 'none' | 'anonymous' | 'use-credentials';
576
- allowedCommonJsDependencies?: string[];
577
- }
578
- interface FileReplacement {
579
- replace?: string;
580
- with?: string;
581
- }
582
- interface Budget1 {
583
- type?: 'all' | 'allScript' | 'any' | 'anyScript' | 'anyComponentStyle' | 'bundle' | 'initial';
584
- name?: string;
585
- baseline?: string;
586
- maximumWarning?: string;
587
- maximumError?: string;
588
- minimumWarning?: string;
589
- minimumError?: string;
590
- warning?: string;
591
- error?: string;
592
- }
593
- interface DevServerTarget {
594
- browserTarget?: string;
595
- port?: number;
596
- host?: string;
597
- proxyConfig?: string;
598
- ssl?: boolean;
599
- sslKey?: string;
600
- sslCert?: string;
601
- headers?: {
602
- [k: string]: string;
603
- };
604
- open?: boolean;
605
- verbose?: boolean;
606
- liveReload?: boolean;
607
- publicHost?: string;
608
- allowedHosts?: string[];
609
- servePath?: string;
610
- disableHostCheck?: boolean;
611
- hmr?: boolean;
612
- watch?: boolean;
613
- poll?: number;
614
- }
615
- interface ExtractI18NTarget {
616
- browserTarget?: string;
617
- format?: 'xmb' | 'xlf' | 'xlif' | 'xliff' | 'xlf2' | 'xliff2' | 'json' | 'arb' | 'legacy-migrate';
618
- progress?: boolean;
619
- outputPath?: string;
620
- outFile?: string;
621
- }
622
- interface KarmaTarget {
623
- main?: string;
624
- tsConfig?: string;
625
- karmaConfig?: string;
626
- polyfills?: string[] | string;
627
- assets?: ({
628
- glob?: string;
629
- input?: string;
630
- output?: string;
631
- ignore?: string[];
632
- } | string)[];
633
- scripts?: ({
634
- input?: string;
635
- bundleName?: string;
636
- inject?: boolean;
637
- } | string)[];
638
- styles?: ({
639
- input?: string;
640
- bundleName?: string;
641
- inject?: boolean;
642
- } | string)[];
643
- inlineStyleLanguage?: 'css' | 'less' | 'sass' | 'scss';
644
- stylePreprocessorOptions?: {
645
- includePaths?: string[];
646
- };
647
- include?: string[];
648
- exclude?: string[];
649
- sourceMap?: {
650
- scripts?: boolean;
651
- styles?: boolean;
652
- vendor?: boolean;
653
- } | boolean;
654
- progress?: boolean;
655
- watch?: boolean;
656
- poll?: number;
657
- preserveSymlinks?: boolean;
658
- browsers?: string;
659
- codeCoverage?: boolean;
660
- codeCoverageExclude?: string[];
661
- fileReplacements?: ({
662
- src?: string;
663
- replaceWith?: string;
664
- } | {
665
- replace?: string;
666
- with?: string;
667
- })[];
668
- reporters?: string[];
669
- webWorkerTsConfig?: string;
670
- }
671
- interface JestBrowserSchemaForBuildFacade {
672
- include?: string[];
673
- exclude?: string[];
674
- tsConfig?: string;
675
- polyfills?: string[] | string;
676
- }
677
- interface ProtractorTarget {
678
- protractorConfig?: string;
679
- devServerTarget?: string;
680
- grep?: string;
681
- invertGrep?: boolean;
682
- specs?: string[];
683
- suite?: string;
684
- webdriverUpdate?: boolean;
685
- port?: number;
686
- host?: string;
687
- baseUrl?: string;
688
- }
689
- interface UniversalTarget {
690
- assets?: ({
691
- followSymlinks?: boolean;
692
- glob?: string;
693
- input?: string;
694
- ignore?: string[];
695
- output?: string;
696
- } | string)[];
697
- main?: string;
698
- tsConfig?: string;
699
- inlineStyleLanguage?: 'css' | 'less' | 'sass' | 'scss';
700
- stylePreprocessorOptions?: {
701
- includePaths?: string[];
702
- };
703
- optimization?: {
704
- scripts?: boolean;
705
- styles?: boolean;
706
- } | boolean;
707
- fileReplacements?: ({
708
- src?: string;
709
- replaceWith?: string;
710
- } | {
711
- replace?: string;
712
- with?: string;
713
- })[];
714
- outputPath?: string;
715
- resourcesOutputPath?: string;
716
- sourceMap?: {
717
- scripts?: boolean;
718
- styles?: boolean;
719
- hidden?: boolean;
720
- vendor?: boolean;
721
- } | boolean;
722
- deployUrl?: string;
723
- vendorChunk?: boolean;
724
- verbose?: boolean;
725
- progress?: boolean;
726
- i18nMissingTranslation?: 'warning' | 'error' | 'ignore';
727
- i18nDuplicateTranslation?: 'warning' | 'error' | 'ignore';
728
- localize?: boolean | [string, ...string[]];
729
- outputHashing?: 'none' | 'all' | 'media' | 'bundles';
730
- deleteOutputPath?: boolean;
731
- preserveSymlinks?: boolean;
732
- extractLicenses?: boolean;
733
- buildOptimizer?: boolean;
734
- namedChunks?: boolean;
735
- externalDependencies?: string[];
736
- statsJson?: boolean;
737
- watch?: boolean;
738
- poll?: number;
739
- }
740
- interface NgPackagrTarget {
741
- project?: string;
742
- tsConfig?: string;
743
- watch?: boolean;
744
- }
745
- export {};
@@ -1 +0,0 @@
1
- export {};