@progress/kendo-angular-schematics 11.0.0-develop.79
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/LICENSE.md +11 -0
- package/NOTICE.txt +654 -0
- package/collection.json +53 -0
- package/package.json +33 -0
- package/src/charts/categorical/files/data.d.ts +5 -0
- package/src/charts/categorical/files/data.js +29 -0
- package/src/charts/categorical/files/data.js.map +1 -0
- package/src/charts/categorical/files/data.ts +25 -0
- package/src/charts/categorical/files/html/__name@dasherize__/__name@dasherize__.component.html +46 -0
- package/src/charts/categorical/files/html/__name@dasherize__/__name@dasherize__.component.ts +25 -0
- package/src/charts/categorical/files/inline/__name@dasherize__/__name@dasherize__.component.ts +69 -0
- package/src/charts/categorical/index.d.ts +7 -0
- package/src/charts/categorical/index.js +124 -0
- package/src/charts/categorical/index.js.map +1 -0
- package/src/charts/categorical/schema.d.ts +92 -0
- package/src/charts/categorical/schema.js +54 -0
- package/src/charts/categorical/schema.js.map +1 -0
- package/src/charts/categorical/schema.json +253 -0
- package/src/charts/circular/files/data.d.ts +5 -0
- package/src/charts/circular/files/data.js +15 -0
- package/src/charts/circular/files/data.js.map +1 -0
- package/src/charts/circular/files/data.ts +11 -0
- package/src/charts/circular/files/html/__name@dasherize__/__name@dasherize__.component.html +27 -0
- package/src/charts/circular/files/html/__name@dasherize__/__name@dasherize__.component.ts +23 -0
- package/src/charts/circular/files/inline/__name@dasherize__/__name@dasherize__.component.ts +52 -0
- package/src/charts/circular/index.d.ts +7 -0
- package/src/charts/circular/index.js +50 -0
- package/src/charts/circular/index.js.map +1 -0
- package/src/charts/circular/schema.d.ts +31 -0
- package/src/charts/circular/schema.js +7 -0
- package/src/charts/circular/schema.js.map +1 -0
- package/src/charts/circular/schema.json +175 -0
- package/src/charts/scatter/files/data.d.ts +5 -0
- package/src/charts/scatter/files/data.js +25 -0
- package/src/charts/scatter/files/data.js.map +1 -0
- package/src/charts/scatter/files/data.ts +21 -0
- package/src/charts/scatter/files/html/__name@dasherize__/__name@dasherize__.component.html +35 -0
- package/src/charts/scatter/files/html/__name@dasherize__/__name@dasherize__.component.ts +21 -0
- package/src/charts/scatter/files/inline/__name@dasherize__/__name@dasherize__.component.ts +58 -0
- package/src/charts/scatter/index.d.ts +7 -0
- package/src/charts/scatter/index.js +50 -0
- package/src/charts/scatter/index.js.map +1 -0
- package/src/charts/scatter/schema.d.ts +32 -0
- package/src/charts/scatter/schema.js +7 -0
- package/src/charts/scatter/schema.js.map +1 -0
- package/src/charts/scatter/schema.json +209 -0
- package/src/charts/stock/files/data.d.ts +5 -0
- package/src/charts/stock/files/data.js +418 -0
- package/src/charts/stock/files/data.js.map +1 -0
- package/src/charts/stock/files/data.ts +414 -0
- package/src/charts/stock/files/html/__name@dasherize__/__name@dasherize__.component.html +57 -0
- package/src/charts/stock/files/html/__name@dasherize__/__name@dasherize__.component.ts +23 -0
- package/src/charts/stock/files/inline/__name@dasherize__/__name@dasherize__.component.ts +83 -0
- package/src/charts/stock/index.d.ts +7 -0
- package/src/charts/stock/index.js +50 -0
- package/src/charts/stock/index.js.map +1 -0
- package/src/charts/stock/schema.d.ts +36 -0
- package/src/charts/stock/schema.js +7 -0
- package/src/charts/stock/schema.js.map +1 -0
- package/src/charts/stock/schema.json +285 -0
- package/src/component/files/__full-path__/__name@folder-name__/__name@dasherize__.component.__styleext__ +0 -0
- package/src/component/files/__full-path__/__name@folder-name__/__name@dasherize__.component.html +1 -0
- package/src/component/files/__full-path__/__name@folder-name__/__name@dasherize__.component.ts +23 -0
- package/src/component/index.d.ts +6 -0
- package/src/component/index.js +18 -0
- package/src/component/index.js.map +1 -0
- package/src/component/schema.d.ts +66 -0
- package/src/component/schema.js +7 -0
- package/src/component/schema.js.map +1 -0
- package/src/component/schema.json +96 -0
- package/src/grid/files/data.d.ts +5 -0
- package/src/grid/files/data.js +1241 -0
- package/src/grid/files/data.js.map +1 -0
- package/src/grid/files/data.ts +1237 -0
- package/src/grid/files/html/__name@dasherize__/__name@dasherize__.component.html +48 -0
- package/src/grid/files/html/__name@dasherize__/__name@dasherize__.component.ts +29 -0
- package/src/grid/files/inline/__name@dasherize__/__name@dasherize__.component.ts +79 -0
- package/src/grid/index.d.ts +7 -0
- package/src/grid/index.js +84 -0
- package/src/grid/index.js.map +1 -0
- package/src/grid/schema.d.ts +44 -0
- package/src/grid/schema.js +28 -0
- package/src/grid/schema.js.map +1 -0
- package/src/grid/schema.json +168 -0
- package/src/ngAdd/index.d.ts +7 -0
- package/src/ngAdd/index.js +143 -0
- package/src/ngAdd/index.js.map +1 -0
- package/src/ngAdd/schema.d.ts +61 -0
- package/src/ngAdd/schema.js +7 -0
- package/src/ngAdd/schema.js.map +1 -0
- package/src/ngAdd/schema.json +70 -0
- package/src/ngAdd/theming.d.ts +8 -0
- package/src/ngAdd/theming.js +79 -0
- package/src/ngAdd/theming.js.map +1 -0
- package/src/rules/index.d.ts +11 -0
- package/src/rules/index.js +80 -0
- package/src/rules/index.js.map +1 -0
- package/src/scheduler/files/events-utc.d.ts +5 -0
- package/src/scheduler/files/events-utc.js +846 -0
- package/src/scheduler/files/events-utc.js.map +1 -0
- package/src/scheduler/files/events-utc.ts +842 -0
- package/src/scheduler/files/html/__name@dasherize__/__name@dasherize__.component.html +29 -0
- package/src/scheduler/files/html/__name@dasherize__/__name@dasherize__.component.ts +17 -0
- package/src/scheduler/files/inline/__name@dasherize__/__name@dasherize__.component.ts +48 -0
- package/src/scheduler/index.d.ts +7 -0
- package/src/scheduler/index.js +47 -0
- package/src/scheduler/index.js.map +1 -0
- package/src/scheduler/schema.d.ts +16 -0
- package/src/scheduler/schema.js +7 -0
- package/src/scheduler/schema.js.map +1 -0
- package/src/scheduler/schema.json +78 -0
- package/src/utils/ast-utils.d.ts +34 -0
- package/src/utils/ast-utils.js +206 -0
- package/src/utils/ast-utils.js.map +1 -0
- package/src/utils/bootstrap-module.d.ts +9 -0
- package/src/utils/bootstrap-module.js +54 -0
- package/src/utils/bootstrap-module.js.map +1 -0
- package/src/utils/find-module.d.ts +25 -0
- package/src/utils/find-module.js +91 -0
- package/src/utils/find-module.js.map +1 -0
- package/src/utils/index.d.ts +16 -0
- package/src/utils/index.js +74 -0
- package/src/utils/index.js.map +1 -0
- package/src/utils/test/create-app-module.d.ts +6 -0
- package/src/utils/test/create-app-module.js +24 -0
- package/src/utils/test/create-app-module.js.map +1 -0
- package/src/utils/test/create-cli-config.d.ts +6 -0
- package/src/utils/test/create-cli-config.js +121 -0
- package/src/utils/test/create-cli-config.js.map +1 -0
- package/src/utils/test/create-main-bootstrap.d.ts +6 -0
- package/src/utils/test/create-main-bootstrap.js +26 -0
- package/src/utils/test/create-main-bootstrap.js.map +1 -0
- package/src/utils/test/create-package-json.d.ts +6 -0
- package/src/utils/test/create-package-json.js +20 -0
- package/src/utils/test/create-package-json.js.map +1 -0
- package/src/utils/test/index.d.ts +8 -0
- package/src/utils/test/index.js +12 -0
- package/src/utils/test/index.js.map +1 -0
- package/src/utils/workspace.d.ts +16 -0
- package/src/utils/workspace.js +58 -0
- package/src/utils/workspace.js.map +1 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2022 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.buildRelativePath = exports.resolveModule = exports.findModule = void 0;
|
|
8
|
+
const core_1 = require("@angular-devkit/core");
|
|
9
|
+
/**
|
|
10
|
+
* Find the module referred by a set of options passed to the schematics.
|
|
11
|
+
*/
|
|
12
|
+
function findModule(host, options) {
|
|
13
|
+
if (Object.hasOwnProperty.call(options, 'skipImport') && options.skipImport) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
if (!options.module) {
|
|
17
|
+
const pathToCheck = (options.path || '')
|
|
18
|
+
+ (options.flat ? '' : '/' + core_1.strings.dasherize(options.name));
|
|
19
|
+
return (0, core_1.normalize)(resolveModule(host, pathToCheck));
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
const modulePath = (0, core_1.normalize)('/' + (options.path) + '/' + options.module);
|
|
23
|
+
const moduleBaseName = (0, core_1.normalize)(modulePath).split('/').pop();
|
|
24
|
+
if (host.exists(modulePath)) {
|
|
25
|
+
return (0, core_1.normalize)(modulePath);
|
|
26
|
+
}
|
|
27
|
+
else if (host.exists(modulePath + '.ts')) {
|
|
28
|
+
return (0, core_1.normalize)(modulePath + '.ts');
|
|
29
|
+
}
|
|
30
|
+
else if (host.exists(modulePath + '.module.ts')) {
|
|
31
|
+
return (0, core_1.normalize)(modulePath + '.module.ts');
|
|
32
|
+
}
|
|
33
|
+
else if (host.exists(modulePath + '/' + moduleBaseName + '.module.ts')) {
|
|
34
|
+
return (0, core_1.normalize)(modulePath + '/' + moduleBaseName + '.module.ts');
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
throw new Error('Specified module does not exist');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.findModule = findModule;
|
|
42
|
+
/**
|
|
43
|
+
* Function to find the "closest" module to a generated file's path.
|
|
44
|
+
*/
|
|
45
|
+
function resolveModule(host, generateDir) {
|
|
46
|
+
let dir = host.getDir('/' + generateDir);
|
|
47
|
+
const moduleRe = /\.module\.ts$/;
|
|
48
|
+
const routingModuleRe = /-routing\.module\.ts/;
|
|
49
|
+
while (dir) {
|
|
50
|
+
const matches = dir.subfiles.filter(p => moduleRe.test(p) && !routingModuleRe.test(p));
|
|
51
|
+
if (matches.length == 1) {
|
|
52
|
+
return (0, core_1.join)(dir.path, matches[0]);
|
|
53
|
+
}
|
|
54
|
+
else if (matches.length > 1) {
|
|
55
|
+
throw new Error('More than one module matches. Use skip-import option to skip importing '
|
|
56
|
+
+ 'the component into the closest module.');
|
|
57
|
+
}
|
|
58
|
+
dir = dir.parent;
|
|
59
|
+
}
|
|
60
|
+
throw new Error('Could not find an NgModule. Use the skip-import '
|
|
61
|
+
+ 'option to skip importing in NgModule.');
|
|
62
|
+
}
|
|
63
|
+
exports.resolveModule = resolveModule;
|
|
64
|
+
/**
|
|
65
|
+
* Build a relative path from one file path to another file path.
|
|
66
|
+
*/
|
|
67
|
+
function buildRelativePath(from, to) {
|
|
68
|
+
from = (0, core_1.normalize)(from);
|
|
69
|
+
to = (0, core_1.normalize)(to);
|
|
70
|
+
// Convert to arrays.
|
|
71
|
+
const fromParts = from.split('/');
|
|
72
|
+
const toParts = to.split('/');
|
|
73
|
+
// Remove file names (preserving destination)
|
|
74
|
+
fromParts.pop();
|
|
75
|
+
const toFileName = toParts.pop();
|
|
76
|
+
const relativePath = (0, core_1.relative)((0, core_1.normalize)(fromParts.join('/')), (0, core_1.normalize)(toParts.join('/')));
|
|
77
|
+
let pathPrefix = '';
|
|
78
|
+
// Set the path prefix for same dir or child dir, parent dir starts with `..`
|
|
79
|
+
if (!relativePath) {
|
|
80
|
+
pathPrefix = '.';
|
|
81
|
+
}
|
|
82
|
+
else if (!relativePath.startsWith('.')) {
|
|
83
|
+
pathPrefix = `./`;
|
|
84
|
+
}
|
|
85
|
+
if (pathPrefix && !pathPrefix.endsWith('/')) {
|
|
86
|
+
pathPrefix += '/';
|
|
87
|
+
}
|
|
88
|
+
return pathPrefix + (relativePath ? relativePath + '/' : '') + toFileName;
|
|
89
|
+
}
|
|
90
|
+
exports.buildRelativePath = buildRelativePath;
|
|
91
|
+
//# sourceMappingURL=find-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-module.js","sourceRoot":"","sources":["../../../../../libs/schematics/src/utils/find-module.ts"],"names":[],"mappings":";;;AAAA,+CAAgF;AAWhF;;GAEG;AACH,SAAgB,UAAU,CAAC,IAAU,EAAE,OAAsB;IAC3D,IAAI,MAAM,CAAC,cAAc,CAAC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AAC,GAAG,CAAC,CAAC;IAE9B,6CAA6C;IAC7C,SAAS,CAAC,GAAG,EAAE,CAAC;IAChB,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAEjC,MAAM,YAAY,GAAG,IAAA,eAAQ,EAAC,IAAA,gBAAS,EAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAA,gBAAS,EAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC5F,IAAI,UAAU,GAAG,EAAE,CAAC;IAEpB,6EAA6E;IAC7E,IAAI,CAAC,YAAY,EAAE;QACjB,UAAU,GAAG,GAAG,CAAC;KAClB;SAAM,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;QACxC,UAAU,GAAG,IAAI,CAAC;KACnB;IACD,IAAI,UAAU,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QAC3C,UAAU,IAAI,GAAG,CAAC;KACnB;IAED,OAAO,UAAU,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC;AAC5E,CAAC;AA1BD,8CA0BC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2022 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Tree } from '@angular-devkit/schematics';
|
|
6
|
+
import { Observable } from 'rxjs';
|
|
7
|
+
export { addSymbolToMetadata, addDeclarationToModule, addExportToModule, addImportToModule } from './ast-utils';
|
|
8
|
+
export { findModule } from './find-module';
|
|
9
|
+
export * from './workspace';
|
|
10
|
+
export { getAppModulePath } from './bootstrap-module';
|
|
11
|
+
export declare const folderName: (options: any) => (name: string) => string;
|
|
12
|
+
export declare const buildSelector: (options: any) => string;
|
|
13
|
+
export declare function stringify(json: any): string;
|
|
14
|
+
export declare function asObservable<T>(thunk: T): Observable<T>;
|
|
15
|
+
export declare function fileContent(tree: Tree, path: string): string;
|
|
16
|
+
export declare const parseComplexOptions: (props: string[], options: any) => any;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2022 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.parseComplexOptions = exports.fileContent = exports.asObservable = exports.stringify = exports.buildSelector = exports.folderName = exports.getAppModulePath = exports.findModule = exports.addImportToModule = exports.addExportToModule = exports.addDeclarationToModule = exports.addSymbolToMetadata = void 0;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const core_1 = require("@angular-devkit/core");
|
|
10
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
11
|
+
const rxjs_1 = require("rxjs");
|
|
12
|
+
var ast_utils_1 = require("./ast-utils");
|
|
13
|
+
Object.defineProperty(exports, "addSymbolToMetadata", { enumerable: true, get: function () { return ast_utils_1.addSymbolToMetadata; } });
|
|
14
|
+
Object.defineProperty(exports, "addDeclarationToModule", { enumerable: true, get: function () { return ast_utils_1.addDeclarationToModule; } });
|
|
15
|
+
Object.defineProperty(exports, "addExportToModule", { enumerable: true, get: function () { return ast_utils_1.addExportToModule; } });
|
|
16
|
+
Object.defineProperty(exports, "addImportToModule", { enumerable: true, get: function () { return ast_utils_1.addImportToModule; } });
|
|
17
|
+
var find_module_1 = require("./find-module");
|
|
18
|
+
Object.defineProperty(exports, "findModule", { enumerable: true, get: function () { return find_module_1.findModule; } });
|
|
19
|
+
tslib_1.__exportStar(require("./workspace"), exports);
|
|
20
|
+
var bootstrap_module_1 = require("./bootstrap-module");
|
|
21
|
+
Object.defineProperty(exports, "getAppModulePath", { enumerable: true, get: function () { return bootstrap_module_1.getAppModulePath; } });
|
|
22
|
+
const folderName = (options) => (name) => options.flat ? '' : core_1.strings.dasherize(name);
|
|
23
|
+
exports.folderName = folderName;
|
|
24
|
+
const prefix = (pre, name) => (pre ? `${pre}-` : '') + name;
|
|
25
|
+
const buildSelector = (options) => {
|
|
26
|
+
const name = options.selector || core_1.strings.dasherize(options.name);
|
|
27
|
+
return prefix(options.prefix, name);
|
|
28
|
+
};
|
|
29
|
+
exports.buildSelector = buildSelector;
|
|
30
|
+
function stringify(json) {
|
|
31
|
+
return `${JSON.stringify(json, null, 2)}\n`;
|
|
32
|
+
}
|
|
33
|
+
exports.stringify = stringify;
|
|
34
|
+
function isObservable(thunk) {
|
|
35
|
+
if (!thunk || typeof thunk !== 'object') {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
if (Symbol.observable && Symbol.observable in thunk) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
return typeof thunk.subscribe === 'function';
|
|
42
|
+
}
|
|
43
|
+
function asObservable(thunk) {
|
|
44
|
+
if (isObservable(thunk)) {
|
|
45
|
+
return thunk;
|
|
46
|
+
}
|
|
47
|
+
return (0, rxjs_1.of)(thunk);
|
|
48
|
+
}
|
|
49
|
+
exports.asObservable = asObservable;
|
|
50
|
+
function fileContent(tree, path) {
|
|
51
|
+
const content = tree.read(path);
|
|
52
|
+
if (content === null) {
|
|
53
|
+
throw new schematics_1.SchematicsException(`File ${path} does not exist.`);
|
|
54
|
+
}
|
|
55
|
+
return content.toString('utf-8');
|
|
56
|
+
}
|
|
57
|
+
exports.fileContent = fileContent;
|
|
58
|
+
const parseComplexOptions = (props, options) => props.reduce((acc, option) => {
|
|
59
|
+
if (options[option]) {
|
|
60
|
+
try {
|
|
61
|
+
const rawValue = options[option];
|
|
62
|
+
const parsed = JSON.parse(rawValue);
|
|
63
|
+
acc[option] = parsed;
|
|
64
|
+
// console.log(`Parsing ${option}, raw: '${rawValue}', json: '${JSON.stringify(parsed, null, " ")}'`);
|
|
65
|
+
}
|
|
66
|
+
catch (e) {
|
|
67
|
+
e.message = `Failed parsing '${option}' input. ${e.message}.`;
|
|
68
|
+
throw e;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return acc;
|
|
72
|
+
}, {});
|
|
73
|
+
exports.parseComplexOptions = parseComplexOptions;
|
|
74
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/schematics/src/utils/index.ts"],"names":[],"mappings":";;;;AAAA,+CAA+C;AAC/C,2DAAuE;AAEvE,+BAAsC;AAEtC,yCAKqB;AAJjB,gHAAA,mBAAmB,OAAA;AACnB,mHAAA,sBAAsB,OAAA;AACtB,8GAAA,iBAAiB,OAAA;AACjB,8GAAA,iBAAiB,OAAA;AAGrB,6CAEuB;AADnB,yGAAA,UAAU,OAAA;AAGd,sDAA4B;AAE5B,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AAElB,MAAM,UAAU,GAAG,CAAC,OAAY,EAAE,EAAE,CAAC,CAAC,IAAY,EAAE,EAAE,CAC3D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AADjC,QAAA,UAAU,cACuB;AAE9C,MAAM,MAAM,GAAG,CAAC,GAAW,EAAE,IAAY,EAAE,EAAE,CACzC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;AAE3B,MAAM,aAAa,GAAG,CAAC,OAAY,EAAE,EAAE;IAC1C,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,IAAI,cAAO,CAAC,SAAS,CAAC,OAAO,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AM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;YACjC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YACpC,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;YACrB,uGAAuG;SAC1G;QAAC,OAAM,CAAC,EAAE;YACP,CAAC,CAAC,OAAO,GAAG,mBAAmB,MAAM,YAAY,CAAC,CAAC,OAAO,GAAG,CAAC;YAC9D,MAAM,CAAC,CAAC;SACX;KACJ;IAED,OAAO,GAAG,CAAC;AACf,CAAC,EAAE,EAAE,CAAC,CAAC;AAfE,QAAA,mBAAmB,uBAerB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2022 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Tree } from "@angular-devkit/schematics";
|
|
6
|
+
export declare function createAppModule(tree: Tree, path?: string): Tree;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2022 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.createAppModule = void 0;
|
|
8
|
+
function createAppModule(tree, path) {
|
|
9
|
+
tree.create(path || '/src/app/app.module.ts', `
|
|
10
|
+
import { NgModule } from '@angular/core';
|
|
11
|
+
import { AppComponent } from './app.component';
|
|
12
|
+
|
|
13
|
+
@NgModule({
|
|
14
|
+
declarations: [
|
|
15
|
+
AppComponent
|
|
16
|
+
],
|
|
17
|
+
imports: []
|
|
18
|
+
})
|
|
19
|
+
export class AppModule { }
|
|
20
|
+
`);
|
|
21
|
+
return tree;
|
|
22
|
+
}
|
|
23
|
+
exports.createAppModule = createAppModule;
|
|
24
|
+
//# sourceMappingURL=create-app-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-app-module.js","sourceRoot":"","sources":["../../../../../../libs/schematics/src/utils/test/create-app-module.ts"],"names":[],"mappings":";;;AAEA,SAAgB,eAAe,CAAC,IAAU,EAAE,IAAa;IACrD,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,wBAAwB,EAAE;;;;;;;;;;;KAW7C,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AAChB,CAAC;AAfD,0CAeC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2022 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Tree } from "@angular-devkit/schematics";
|
|
6
|
+
export declare function createCliConfig(tree: Tree, options?: any): Tree;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2022 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.createCliConfig = void 0;
|
|
8
|
+
const __1 = require("..");
|
|
9
|
+
const config = {
|
|
10
|
+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
11
|
+
"version": 1,
|
|
12
|
+
"newProjectRoot": "projects",
|
|
13
|
+
"projects": {
|
|
14
|
+
"demo": {
|
|
15
|
+
"root": "",
|
|
16
|
+
"sourceRoot": "src",
|
|
17
|
+
"projectType": "application",
|
|
18
|
+
"prefix": "app",
|
|
19
|
+
"schematics": {},
|
|
20
|
+
"architect": {
|
|
21
|
+
"build": {
|
|
22
|
+
"builder": "@angular-devkit/build-angular:browser",
|
|
23
|
+
"options": {
|
|
24
|
+
"outputPath": "dist/demo",
|
|
25
|
+
"index": "src/index.html",
|
|
26
|
+
"main": "src/main.ts",
|
|
27
|
+
"polyfills": "src/polyfills.ts",
|
|
28
|
+
"tsConfig": "src/tsconfig.app.json",
|
|
29
|
+
"assets": [
|
|
30
|
+
"src/favicon.ico",
|
|
31
|
+
"src/assets"
|
|
32
|
+
],
|
|
33
|
+
"styles": [
|
|
34
|
+
"src/styles.css"
|
|
35
|
+
],
|
|
36
|
+
"scripts": []
|
|
37
|
+
},
|
|
38
|
+
"configurations": {
|
|
39
|
+
"production": {
|
|
40
|
+
"fileReplacements": [
|
|
41
|
+
{
|
|
42
|
+
"replace": "src/environments/environment.ts",
|
|
43
|
+
"with": "src/environments/environment.prod.ts"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"optimization": true,
|
|
47
|
+
"outputHashing": "all",
|
|
48
|
+
"sourceMap": false,
|
|
49
|
+
"extractCss": true,
|
|
50
|
+
"namedChunks": false,
|
|
51
|
+
"aot": true,
|
|
52
|
+
"extractLicenses": true,
|
|
53
|
+
"vendorChunk": false,
|
|
54
|
+
"buildOptimizer": true
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"serve": {
|
|
59
|
+
"builder": "@angular-devkit/build-angular:dev-server",
|
|
60
|
+
"options": {
|
|
61
|
+
"browserTarget": "demo:build"
|
|
62
|
+
},
|
|
63
|
+
"configurations": {
|
|
64
|
+
"production": {
|
|
65
|
+
"browserTarget": "demo:build:production"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"extract-i18n": {
|
|
70
|
+
"builder": "@angular-devkit/build-angular:extract-i18n",
|
|
71
|
+
"options": {
|
|
72
|
+
"browserTarget": "demo:build"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"test": {
|
|
76
|
+
"builder": "@angular-devkit/build-angular:karma",
|
|
77
|
+
"options": {
|
|
78
|
+
"main": "src/test.ts",
|
|
79
|
+
"polyfills": "src/polyfills.ts",
|
|
80
|
+
"tsConfig": "src/tsconfig.spec.json",
|
|
81
|
+
"karmaConfig": "src/karma.conf.js",
|
|
82
|
+
"styles": [
|
|
83
|
+
"styles.css"
|
|
84
|
+
],
|
|
85
|
+
"scripts": [],
|
|
86
|
+
"assets": [
|
|
87
|
+
"src/favicon.ico",
|
|
88
|
+
"src/assets"
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"lint": {
|
|
93
|
+
"builder": "@angular-devkit/build-angular:tslint",
|
|
94
|
+
"options": {
|
|
95
|
+
"tsConfig": [
|
|
96
|
+
"src/tsconfig.app.json",
|
|
97
|
+
"src/tsconfig.spec.json"
|
|
98
|
+
],
|
|
99
|
+
"exclude": [
|
|
100
|
+
"**/node_modules/**"
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"defaultProject": "demo"
|
|
108
|
+
};
|
|
109
|
+
function createCliConfig(tree, options = {}) {
|
|
110
|
+
if (options.skipTests) {
|
|
111
|
+
delete config.projects.demo.architect.test;
|
|
112
|
+
}
|
|
113
|
+
let content = (0, __1.stringify)(config);
|
|
114
|
+
if (options.useTargets) {
|
|
115
|
+
content = content.replace(/architect/g, 'targets');
|
|
116
|
+
}
|
|
117
|
+
tree.create('/angular.json', content);
|
|
118
|
+
return tree;
|
|
119
|
+
}
|
|
120
|
+
exports.createCliConfig = createCliConfig;
|
|
121
|
+
//# sourceMappingURL=create-cli-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-cli-config.js","sourceRoot":"","sources":["../../../../../../libs/schematics/src/utils/test/create-cli-config.ts"],"names":[],"mappings":";;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vD,SAAS,EAAE;wBACP,eAAe,EAAE,YAAY;qBAChC;iBACA;gBACD,MAAM,EAAE;oBACR,SAAS,EAAE,qCAAqC;oBAChD,SAAS,EAAE;wBACP,MAAM,EAAE,aAAa;wBACrB,WAAW,EAAE,kBAAkB;wBAC/B,UAAU,EAAE,wBAAwB;wBACpC,aAAa,EAAE,mBAAmB;wBAClC,QAAQ,EAAE;4BACN,YAAY;yBACf;wBACD,SAAS,EAAE,EAAE;wBACT,QAAQ,EAAE;4BACV,iBAAiB;4BACjB,YAAY;yBACf;qBACJ;iBACA;gBACD,MAAM,EAAE;oBACR,SAAS,EAAE,sCAAsC;oBACjD,SAAS,EAAE;wBACP,UAAU,EAAE;4BACZ,uBAAuB;4BACvB,wBAAwB;yBACvB;wBACD,SAAS,EAAE;4BACX,oBAAoB;yBACnB;qBACJ;iBACA;aACJ;SACJ;KACJ;IACD,gBAAgB,EAAE,MAAM;CAC3B,CAAC;AAEF,SAAgB,eAAe,CAAC,IAAU,EAAE,UAAe,EAAE;IACzD,IAAI,OAAO,CAAC,SAAS,EAAE;QACnB,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;KAC9C;IAED,IAAI,OAAO,GAAG,IAAA,aAAS,EAAC,MAAM,CAAC,CAAC;IAChC,IAAI,OAAO,CAAC,UAAU,EAAE;QACpB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;KACtD;IAED,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IAEtC,OAAO,IAAI,CAAC;AAChB,CAAC;AAbD,0CAaC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2022 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Tree } from "@angular-devkit/schematics";
|
|
6
|
+
export declare function createMainBootstrap(tree: Tree, path?: string): Tree;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2022 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.createMainBootstrap = void 0;
|
|
8
|
+
function createMainBootstrap(tree, path) {
|
|
9
|
+
tree.create(path || '/src/main.ts', `
|
|
10
|
+
import { enableProdMode } from '@angular/core';
|
|
11
|
+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
12
|
+
|
|
13
|
+
import { AppModule } from './app/app.module';
|
|
14
|
+
import { environment } from './environments/environment';
|
|
15
|
+
|
|
16
|
+
if (environment.production) {
|
|
17
|
+
enableProdMode();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
platformBrowserDynamic().bootstrapModule(AppModule)
|
|
21
|
+
.catch(err => console.log(err));
|
|
22
|
+
`);
|
|
23
|
+
return tree;
|
|
24
|
+
}
|
|
25
|
+
exports.createMainBootstrap = createMainBootstrap;
|
|
26
|
+
//# sourceMappingURL=create-main-bootstrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-main-bootstrap.js","sourceRoot":"","sources":["../../../../../../libs/schematics/src/utils/test/create-main-bootstrap.ts"],"names":[],"mappings":";;;AAEA,SAAgB,mBAAmB,CAAC,IAAU,EAAE,IAAa;IACzD,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,cAAc,EAAE;;;;;;;;;;;;;KAanC,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AAChB,CAAC;AAjBD,kDAiBC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2022 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Tree } from "@angular-devkit/schematics";
|
|
6
|
+
export declare function createPackageJson(tree: Tree, path?: string): Tree;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2022 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.createPackageJson = void 0;
|
|
8
|
+
const __1 = require("..");
|
|
9
|
+
const config = {
|
|
10
|
+
"peerDependencies": {
|
|
11
|
+
"@progress/kendo-dependency": "^1.0.0",
|
|
12
|
+
"hammerjs": "^2.0.0"
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
function createPackageJson(tree, path) {
|
|
16
|
+
tree.create(path || 'node_modules/@progress/kendo-angular-grid/package.json', (0, __1.stringify)(config));
|
|
17
|
+
return tree;
|
|
18
|
+
}
|
|
19
|
+
exports.createPackageJson = createPackageJson;
|
|
20
|
+
//# sourceMappingURL=create-package-json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-package-json.js","sourceRoot":"","sources":["../../../../../../libs/schematics/src/utils/test/create-package-json.ts"],"names":[],"mappings":";;;AACA,0BAA+B;AAE/B,MAAM,MAAM,GAAG;IACX,kBAAkB,EAAE;QAChB,4BAA4B,EAAE,QAAQ;QACtC,UAAU,EAAE,QAAQ;KACvB;CACJ,CAAC;AAEF,SAAgB,iBAAiB,CAAC,IAAU,EAAE,IAAa;IACvD,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,wDAAwD,EAAE,IAAA,aAAS,EAAC,MAAM,CAAC,CAAC,CAAC;IAEjG,OAAO,IAAI,CAAC;AAChB,CAAC;AAJD,8CAIC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2022 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
export * from './create-app-module';
|
|
6
|
+
export * from './create-cli-config';
|
|
7
|
+
export * from './create-main-bootstrap';
|
|
8
|
+
export * from './create-package-json';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2022 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const tslib_1 = require("tslib");
|
|
8
|
+
tslib_1.__exportStar(require("./create-app-module"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./create-cli-config"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./create-main-bootstrap"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./create-package-json"), exports);
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/schematics/src/utils/test/index.ts"],"names":[],"mappings":";;;AAAA,8DAAoC;AACpC,8DAAoC;AACpC,kEAAwC;AACxC,gEAAsC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2022 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { workspaces } from '@angular-devkit/core';
|
|
6
|
+
import { Tree } from '@angular-devkit/schematics';
|
|
7
|
+
export declare type WorkspaceSchema = workspaces.WorkspaceDefinition;
|
|
8
|
+
export declare type WorkspaceProject = workspaces.ProjectDefinition;
|
|
9
|
+
export declare function getWorkspace(host: Tree): WorkspaceSchema;
|
|
10
|
+
export declare function getWorkspacePath(host: Tree): string;
|
|
11
|
+
/**
|
|
12
|
+
* Gets a project from the Angular CLI workspace. If no project name is given, the first project
|
|
13
|
+
* will be retrieved.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getProjectFromWorkspace(config: WorkspaceSchema, projectName?: string): any;
|
|
16
|
+
export declare function resolveProject(host: Tree, projectName?: string): any;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2022 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.resolveProject = exports.getProjectFromWorkspace = exports.getWorkspacePath = exports.getWorkspace = void 0;
|
|
8
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
9
|
+
function getWorkspace(host) {
|
|
10
|
+
const path = getWorkspacePath(host);
|
|
11
|
+
const configBuffer = host.read(path);
|
|
12
|
+
if (configBuffer === null) {
|
|
13
|
+
throw new schematics_1.SchematicsException(`Could not find (${path})`);
|
|
14
|
+
}
|
|
15
|
+
const config = configBuffer.toString();
|
|
16
|
+
return JSON.parse(config);
|
|
17
|
+
}
|
|
18
|
+
exports.getWorkspace = getWorkspace;
|
|
19
|
+
function getWorkspacePath(host) {
|
|
20
|
+
const possibleFiles = ['/angular.json', '/.angular.json'];
|
|
21
|
+
const path = possibleFiles.filter(path => host.exists(path))[0];
|
|
22
|
+
return path;
|
|
23
|
+
}
|
|
24
|
+
exports.getWorkspacePath = getWorkspacePath;
|
|
25
|
+
/**
|
|
26
|
+
* Gets a project from the Angular CLI workspace. If no project name is given, the first project
|
|
27
|
+
* will be retrieved.
|
|
28
|
+
*/
|
|
29
|
+
function getProjectFromWorkspace(config, projectName) {
|
|
30
|
+
if (!config.projects)
|
|
31
|
+
throw new schematics_1.SchematicsException('No projects are defined');
|
|
32
|
+
if (projectName) {
|
|
33
|
+
const project = config.projects[projectName];
|
|
34
|
+
if (!project) {
|
|
35
|
+
throw new schematics_1.SchematicsException(`No project named "${projectName}" exists.`);
|
|
36
|
+
}
|
|
37
|
+
Object.defineProperty(project, 'name', { enumerable: false, value: projectName });
|
|
38
|
+
return project;
|
|
39
|
+
}
|
|
40
|
+
// If there is exactly one non-e2e, non-library project, use that.
|
|
41
|
+
// Otherwise, project must be specified.
|
|
42
|
+
const allProjectNames = Object.entries(config.projects)
|
|
43
|
+
.filter(([name, value]) => value.projectType !== 'library')
|
|
44
|
+
.filter(([name, _]) => !name.includes('e2e'));
|
|
45
|
+
if (allProjectNames.length !== 1)
|
|
46
|
+
throw new schematics_1.SchematicsException('Multiple projects are defined; please specify a project name');
|
|
47
|
+
const [name, _] = allProjectNames[0];
|
|
48
|
+
const project = config.projects[name];
|
|
49
|
+
Object.defineProperty(project, 'name', { enumerable: false, value: projectName });
|
|
50
|
+
return project;
|
|
51
|
+
}
|
|
52
|
+
exports.getProjectFromWorkspace = getProjectFromWorkspace;
|
|
53
|
+
function resolveProject(host, projectName) {
|
|
54
|
+
const workspace = getWorkspace(host);
|
|
55
|
+
return getProjectFromWorkspace(workspace, projectName);
|
|
56
|
+
}
|
|
57
|
+
exports.resolveProject = resolveProject;
|
|
58
|
+
//# sourceMappingURL=workspace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../../../libs/schematics/src/utils/workspace.ts"],"names":[],"mappings":";;;AACA,2DAAuE;AAKvE,SAAgB,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