@po-ui/ng-sync 18.23.0 → 19.0.0-next.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/fesm2022/po-ui-ng-sync.mjs +37 -19
- package/fesm2022/po-ui-ng-sync.mjs.map +1 -1
- package/lib/services/po-http-client/po-http-client.service.d.ts +8 -8
- package/lib/services/po-sync/interfaces/po-sync-response.interface.d.ts +1 -1
- package/package.json +13 -15
- package/po-ui-ng-sync-19.0.0-next.0.tgz +0 -0
- package/schematics/collection.json +5 -0
- package/schematics/migrations.json +6 -1
- package/schematics/ng-add/index.d.ts +1 -5
- package/schematics/ng-add/index.js +3 -37
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/setup-project.d.ts +2 -0
- package/schematics/ng-add/setup-project.js +179 -0
- package/schematics/ng-add/setup-project.js.map +1 -0
- package/schematics/ng-generate/schema/index.js +1 -1
- package/schematics/ng-generate/schema/index.js.map +1 -1
- package/schematics/ng-update/v14/index.js +2 -2
- package/schematics/ng-update/v14/index.js.map +1 -1
- package/schematics/ng-update/v15/index.js +2 -2
- package/schematics/ng-update/v15/index.js.map +1 -1
- package/schematics/ng-update/v16/index.js +2 -2
- package/schematics/ng-update/v16/index.js.map +1 -1
- package/schematics/ng-update/v17/index.js +2 -2
- package/schematics/ng-update/v17/index.js.map +1 -1
- package/schematics/ng-update/v18/index.js +2 -2
- package/schematics/ng-update/v18/index.js.map +1 -1
- package/schematics/ng-update/v19/changes.d.ts +2 -0
- package/schematics/ng-update/v19/changes.js +14 -0
- package/schematics/ng-update/v19/changes.js.map +1 -0
- package/schematics/ng-update/v19/index.d.ts +1 -0
- package/schematics/ng-update/v19/index.js +16 -0
- package/schematics/ng-update/v19/index.js.map +1 -0
- package/schematics/ng-update/v2/index.js +3 -4
- package/schematics/ng-update/v2/index.js.map +1 -1
- package/schematics/ng-update/v3/index.js +2 -3
- package/schematics/ng-update/v3/index.js.map +1 -1
- package/schematics/ng-update/v4/index.js +2 -2
- package/schematics/ng-update/v4/index.js.map +1 -1
- package/schematics/ng-update/v5/index.js +2 -2
- package/schematics/ng-update/v5/index.js.map +1 -1
- package/schematics/ng-update/v6/index.js +2 -2
- package/schematics/ng-update/v6/index.js.map +1 -1
- package/esm2022/lib/index.mjs +0 -15
- package/esm2022/lib/models/index.mjs +0 -6
- package/esm2022/lib/models/po-data-message.model.mjs +0 -57
- package/esm2022/lib/models/po-data-transform.model.mjs +0 -23
- package/esm2022/lib/models/po-entity/po-entity.model.mjs +0 -217
- package/esm2022/lib/models/po-event-sourcing-error-response.model.mjs +0 -21
- package/esm2022/lib/models/po-network-status.model.mjs +0 -45
- package/esm2022/lib/models/po-network-type.enum.mjs +0 -30
- package/esm2022/lib/models/po-query-builder/po-query-builder.model.mjs +0 -246
- package/esm2022/lib/models/po-request-type.enum.mjs +0 -16
- package/esm2022/lib/po-sync.module.mjs +0 -40
- package/esm2022/lib/services/po-event-sourcing/enums/po-event-sourcing-operation.enum.mjs +0 -17
- package/esm2022/lib/services/po-event-sourcing/index.mjs +0 -4
- package/esm2022/lib/services/po-event-sourcing/interfaces/po-event-sourcing-item.interface.mjs +0 -2
- package/esm2022/lib/services/po-event-sourcing/interfaces/po-event-sourcing-summary-item.interface.mjs +0 -2
- package/esm2022/lib/services/po-event-sourcing/po-event-sourcing.service.mjs +0 -379
- package/esm2022/lib/services/po-http-client/interfaces/po-http-header-option.interface.mjs +0 -11
- package/esm2022/lib/services/po-http-client/interfaces/po-http-request-data.interface.mjs +0 -2
- package/esm2022/lib/services/po-http-client/interfaces/po-response-api.interface.mjs +0 -2
- package/esm2022/lib/services/po-http-client/po-http-client.service.mjs +0 -149
- package/esm2022/lib/services/po-http-client/po-http-request-type.enum.mjs +0 -25
- package/esm2022/lib/services/po-network/po-network.service.mjs +0 -59
- package/esm2022/lib/services/po-schema/index.mjs +0 -4
- package/esm2022/lib/services/po-schema/po-schema-definition/po-schema-definition.service.mjs +0 -78
- package/esm2022/lib/services/po-schema/po-schema-util/po-schema-util.model.mjs +0 -124
- package/esm2022/lib/services/po-schema/po-schema.service.mjs +0 -176
- package/esm2022/lib/services/po-sync/interfaces/po-sync-config.interface.mjs +0 -2
- package/esm2022/lib/services/po-sync/interfaces/po-sync-field-options.interface.mjs +0 -2
- package/esm2022/lib/services/po-sync/interfaces/po-sync-response.interface.mjs +0 -2
- package/esm2022/lib/services/po-sync/interfaces/po-sync-schema.interface.mjs +0 -2
- package/esm2022/lib/services/po-sync/po-sync.service.mjs +0 -336
- package/esm2022/lib/utils/utils.mjs +0 -63
- package/esm2022/po-ui-ng-sync.mjs +0 -5
- package/esm2022/public-api.mjs +0 -2
- package/po-ui-ng-sync-18.23.0.tgz +0 -0
|
@@ -19,35 +19,35 @@ export declare class PoHttpClientService {
|
|
|
19
19
|
* @param {PoHttpRequestData} poHttpOperationData Parâmetros para a construção
|
|
20
20
|
* da requisição.
|
|
21
21
|
*/
|
|
22
|
-
createRequest(poHttpOperationData: PoHttpRequestData): Observable<HttpResponse<
|
|
22
|
+
createRequest(poHttpOperationData: PoHttpRequestData): Observable<HttpResponse<object>>;
|
|
23
23
|
/**
|
|
24
24
|
* Constrói uma requisição com o método `delete`.
|
|
25
25
|
*
|
|
26
26
|
* @param {string} url URL da requisição.
|
|
27
27
|
* @param {Array<PoHeaderOption>} httpHeaders Cabeçalhos da requisição.
|
|
28
28
|
*/
|
|
29
|
-
delete(url: string, httpHeaders?: Array<PoHttpHeaderOption>): Observable<HttpResponse<
|
|
29
|
+
delete(url: string, httpHeaders?: Array<PoHttpHeaderOption>): Observable<HttpResponse<object>>;
|
|
30
30
|
/**
|
|
31
31
|
* Constrói uma requisição com o método `get`.
|
|
32
32
|
*
|
|
33
33
|
* @param {string} url URL da requisição.
|
|
34
34
|
* @param {Array<PoHeaderOption>} httpHeaders Cabeçalhos da requisição.
|
|
35
35
|
*/
|
|
36
|
-
get(url: string, httpHeaders?: Array<PoHttpHeaderOption>): Observable<HttpResponse<
|
|
36
|
+
get(url: string, httpHeaders?: Array<PoHttpHeaderOption>): Observable<HttpResponse<object>>;
|
|
37
37
|
/**
|
|
38
38
|
* Constrói uma requisição com o método `head`.
|
|
39
39
|
*
|
|
40
40
|
* @param {string} url URL da requisição.
|
|
41
41
|
* @param {Array<PoHeaderOption>} httpHeaders Cabeçalhos da requisição.
|
|
42
42
|
*/
|
|
43
|
-
head(url: string, httpHeaders?: Array<PoHttpHeaderOption>): Observable<HttpResponse<
|
|
43
|
+
head(url: string, httpHeaders?: Array<PoHttpHeaderOption>): Observable<HttpResponse<object>>;
|
|
44
44
|
/**
|
|
45
45
|
* Constrói uma requisição com o método `options`.
|
|
46
46
|
*
|
|
47
47
|
* @param {string} url URL da requisição.
|
|
48
48
|
* @param {Array<PoHeaderOption>} httpHeaders Cabeçalhos da requisição.
|
|
49
49
|
*/
|
|
50
|
-
options(url: string, httpHeaders?: Array<PoHttpHeaderOption>): Observable<HttpResponse<
|
|
50
|
+
options(url: string, httpHeaders?: Array<PoHttpHeaderOption>): Observable<HttpResponse<object>>;
|
|
51
51
|
/**
|
|
52
52
|
* Constrói uma requisição com o método `patch`.
|
|
53
53
|
*
|
|
@@ -55,7 +55,7 @@ export declare class PoHttpClientService {
|
|
|
55
55
|
* @param {any} body Corpo da requisição.
|
|
56
56
|
* @param {Array<PoHeaderOption>} httpHeaders Cabeçalhos da requisição.
|
|
57
57
|
*/
|
|
58
|
-
patch(url: string, body?: any, httpHeaders?: Array<PoHttpHeaderOption>): Observable<HttpResponse<
|
|
58
|
+
patch(url: string, body?: any, httpHeaders?: Array<PoHttpHeaderOption>): Observable<HttpResponse<object>>;
|
|
59
59
|
/**
|
|
60
60
|
* Constrói uma requisição com o método `post`.
|
|
61
61
|
*
|
|
@@ -63,7 +63,7 @@ export declare class PoHttpClientService {
|
|
|
63
63
|
* @param {any} body Corpo da requisição.
|
|
64
64
|
* @param {Array<PoHeaderOption>} httpHeaders Cabeçalhos da requisição.
|
|
65
65
|
*/
|
|
66
|
-
post(url: string, body?: any, httpHeaders?: Array<PoHttpHeaderOption>): Observable<HttpResponse<
|
|
66
|
+
post(url: string, body?: any, httpHeaders?: Array<PoHttpHeaderOption>): Observable<HttpResponse<object>>;
|
|
67
67
|
/**
|
|
68
68
|
* Constrói uma requisição com o método `put`.
|
|
69
69
|
*
|
|
@@ -71,7 +71,7 @@ export declare class PoHttpClientService {
|
|
|
71
71
|
* @param {any} body Corpo da requisição.
|
|
72
72
|
* @param {Array<PoHeaderOption>} httpHeaders Cabeçalhos da requisição.
|
|
73
73
|
*/
|
|
74
|
-
put(url: string, body?: any, httpHeaders?: Array<PoHttpHeaderOption>): Observable<HttpResponse<
|
|
74
|
+
put(url: string, body?: any, httpHeaders?: Array<PoHttpHeaderOption>): Observable<HttpResponse<object>>;
|
|
75
75
|
private createHttpHeaders;
|
|
76
76
|
static ɵfac: i0.ɵɵFactoryDeclaration<PoHttpClientService, never>;
|
|
77
77
|
static ɵprov: i0.ɵɵInjectableDeclaration<PoHttpClientService>;
|
|
@@ -16,5 +16,5 @@ export interface PoSyncResponse {
|
|
|
16
16
|
/** Dados da requisição. */
|
|
17
17
|
request: PoHttpRequestData;
|
|
18
18
|
/** Resposta retornada após a tentativa de envio para o servidor. */
|
|
19
|
-
response: HttpResponse<
|
|
19
|
+
response: HttpResponse<object> | HttpErrorResponse | PoEventSourcingErrorResponse;
|
|
20
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@po-ui/ng-sync",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "19.0.0-next.0",
|
|
4
4
|
"description": "PO UI - Sync",
|
|
5
5
|
"author": "PO UI",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,23 +18,23 @@
|
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@capacitor/core": "^
|
|
22
|
-
"@capacitor/network": "^
|
|
23
|
-
"@po-ui/ng-storage": "
|
|
21
|
+
"@capacitor/core": "^6.2.0",
|
|
22
|
+
"@capacitor/network": "^6.0.1",
|
|
23
|
+
"@po-ui/ng-storage": "19.0.0-next.0",
|
|
24
24
|
"http-status-codes": "^2.3.0",
|
|
25
|
-
"@po-ui/ng-schematics": "
|
|
26
|
-
"tslib": "^2.
|
|
25
|
+
"@po-ui/ng-schematics": "19.0.0-next.0",
|
|
26
|
+
"tslib": "^2.3.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@angular/core": "^
|
|
30
|
-
"@angular-devkit/schematics": "^
|
|
31
|
-
"@capacitor/core": "^
|
|
32
|
-
"@capacitor/network": "^
|
|
33
|
-
"@po-ui/ng-storage": "
|
|
29
|
+
"@angular/core": "^19",
|
|
30
|
+
"@angular-devkit/schematics": "^19",
|
|
31
|
+
"@capacitor/core": "^6.2.0",
|
|
32
|
+
"@capacitor/network": "^6.0.1",
|
|
33
|
+
"@po-ui/ng-storage": "19.0.0-next.0",
|
|
34
34
|
"http-status-codes": "^2.3.0",
|
|
35
|
-
"rxjs": "~7.8.
|
|
35
|
+
"rxjs": "~7.8.0",
|
|
36
36
|
"rxjs-compat": "~6.6.0",
|
|
37
|
-
"zone.js": "~0.
|
|
37
|
+
"zone.js": "~0.15.0"
|
|
38
38
|
},
|
|
39
39
|
"module": "fesm2022/po-ui-ng-sync.mjs",
|
|
40
40
|
"typings": "index.d.ts",
|
|
@@ -44,8 +44,6 @@
|
|
|
44
44
|
},
|
|
45
45
|
".": {
|
|
46
46
|
"types": "./index.d.ts",
|
|
47
|
-
"esm2022": "./esm2022/po-ui-ng-sync.mjs",
|
|
48
|
-
"esm": "./esm2022/po-ui-ng-sync.mjs",
|
|
49
47
|
"default": "./fesm2022/po-ui-ng-sync.mjs"
|
|
50
48
|
}
|
|
51
49
|
},
|
|
Binary file
|
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
"factory": "./ng-add/index",
|
|
7
7
|
"schema": "./ng-add/schema.json"
|
|
8
8
|
},
|
|
9
|
+
"ng-add-setup-project": {
|
|
10
|
+
"description": "Sets up the specified project after the ng-add dependencies have been installed.",
|
|
11
|
+
"private": true,
|
|
12
|
+
"factory": "./ng-add/setup-project"
|
|
13
|
+
},
|
|
9
14
|
"schema": {
|
|
10
15
|
"description": "Create a schema to sync a entity ",
|
|
11
16
|
"factory": "./ng-generate/schema/index",
|
|
@@ -47,9 +47,14 @@
|
|
|
47
47
|
"factory": "./ng-update/v17/index"
|
|
48
48
|
},
|
|
49
49
|
"migration-v18": {
|
|
50
|
-
"version": "
|
|
50
|
+
"version": "19.0.0-next.0",
|
|
51
51
|
"description": "Atualiza @po-ui/ng-sync para v18",
|
|
52
52
|
"factory": "./ng-update/v18/index"
|
|
53
|
+
},
|
|
54
|
+
"migration-v19": {
|
|
55
|
+
"version": "19.0.0-next.0",
|
|
56
|
+
"description": "Atualiza @po-ui/ng-sync para v19",
|
|
57
|
+
"factory": "./ng-update/v19/index"
|
|
53
58
|
}
|
|
54
59
|
}
|
|
55
60
|
}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { Rule
|
|
2
|
-
import { WorkspaceProject } from '@schematics/angular/utility/workspace-models';
|
|
1
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
3
2
|
/**
|
|
4
3
|
* Scaffolds the basics of the PO Sync, this includes:
|
|
5
4
|
* - Install dependencies;
|
|
6
5
|
* - Imports PoStorageModule and PoSyncModule to app root module;
|
|
7
6
|
*/
|
|
8
7
|
export default function (options: any): Rule;
|
|
9
|
-
export declare function addModuleImportToRootModuleSync(options: any, moduleName: string, modulePath: string): (host: Tree) => import("@angular-devkit/schematics/src/tree/interface").Tree;
|
|
10
|
-
/** Looks for the main TypeScript file in the given project and returns its path. */
|
|
11
|
-
export declare function getProjectMainFileSync(project: WorkspaceProject): string;
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.default = default_1;
|
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
5
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
6
|
-
const module_1 = require("@po-ui/ng-schematics/module");
|
|
7
6
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
8
|
-
const project_1 = require("@po-ui/ng-schematics/project");
|
|
9
|
-
const ng_ast_utils_1 = require("@schematics/angular/utility/ng-ast-utils");
|
|
10
|
-
/** PO Module name that will be inserted into app root module */
|
|
11
|
-
const poStorageModuleName = 'PoStorageModule.forRoot()';
|
|
12
|
-
const poStorageModuleSourcePath = '@po-ui/ng-storage';
|
|
13
|
-
const poPoSyncModuleName = 'PoSyncModule';
|
|
14
|
-
const poPoSyncModuleSourcePath = '@po-ui/ng-sync';
|
|
15
7
|
/**
|
|
16
8
|
* Scaffolds the basics of the PO Sync, this includes:
|
|
17
9
|
* - Install dependencies;
|
|
@@ -20,40 +12,14 @@ const poPoSyncModuleSourcePath = '@po-ui/ng-sync';
|
|
|
20
12
|
function default_1(options) {
|
|
21
13
|
return (0, schematics_1.chain)([
|
|
22
14
|
addPoPackageAndInstall(),
|
|
23
|
-
|
|
24
|
-
addModuleImportToRootModuleSync(options, poPoSyncModuleName, poPoSyncModuleSourcePath)
|
|
15
|
+
(0, schematics_1.schematic)('ng-add-setup-project', Object.assign({}, options))
|
|
25
16
|
]);
|
|
26
17
|
}
|
|
27
|
-
exports.default = default_1;
|
|
28
18
|
function addPoPackageAndInstall() {
|
|
29
19
|
return (tree, context) => {
|
|
30
|
-
(0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-sync', '
|
|
20
|
+
(0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-sync', '19.0.0-next.0');
|
|
31
21
|
// install packages
|
|
32
22
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
33
23
|
};
|
|
34
24
|
}
|
|
35
|
-
function addModuleImportToRootModuleSync(options, moduleName, modulePath) {
|
|
36
|
-
return (host) => {
|
|
37
|
-
var _a;
|
|
38
|
-
const workspace = (_a = (0, project_1.getWorkspaceConfigGracefully)(host)) !== null && _a !== void 0 ? _a : {};
|
|
39
|
-
const project = (0, project_1.getProjectFromWorkspace)(workspace, options.project);
|
|
40
|
-
const browserEntryPoint = getProjectMainFileSync(project);
|
|
41
|
-
const appModulePath = (0, ng_ast_utils_1.getAppModulePath)(host, browserEntryPoint);
|
|
42
|
-
if (!(0, module_1.hasNgModuleImport)(host, appModulePath, moduleName)) {
|
|
43
|
-
// not add the module if the project already use
|
|
44
|
-
(0, module_1.addModuleImportToModule)(host, appModulePath, moduleName, modulePath);
|
|
45
|
-
}
|
|
46
|
-
return host;
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
exports.addModuleImportToRootModuleSync = addModuleImportToRootModuleSync;
|
|
50
|
-
/** Looks for the main TypeScript file in the given project and returns its path. */
|
|
51
|
-
function getProjectMainFileSync(project) {
|
|
52
|
-
const buildOptions = (0, project_1.getProjectTargetOptions)(project, 'build');
|
|
53
|
-
if (!buildOptions.main) {
|
|
54
|
-
throw new schematics_1.SchematicsException(`Could not find the project main file inside of the ` + `workspace config (${project.sourceRoot})`);
|
|
55
|
-
}
|
|
56
|
-
return buildOptions.main;
|
|
57
|
-
}
|
|
58
|
-
exports.getProjectMainFileSync = getProjectMainFileSync;
|
|
59
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../projects/sync/schematics/ng-add/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../projects/sync/schematics/ng-add/index.ts"],"names":[],"mappings":";;AAUA,4BAOC;AAjBD,2DAA4F;AAC5F,4DAA0E;AAE1E,wEAA8E;AAE9E;;;;GAIG;AACH,mBAAyB,OAAY;IACnC,OAAO,IAAA,kBAAK,EAAC;QACX,sBAAsB,EAAE;QACxB,IAAA,sBAAS,EAAC,sBAAsB,oBAC3B,OAAO,EACV;KACH,CAAC,CAAC;AACL,CAAC;AAED,SAAS,sBAAsB;IAC7B,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC/C,IAAA,wCAAuB,EAAC,IAAI,EAAE,gBAAgB,EAAE,mBAAmB,CAAC,CAAC;QAErE,mBAAmB;QACnB,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;IAChD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const ng_ast_utils_1 = require("@schematics/angular/utility/ng-ast-utils");
|
|
6
|
+
const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
|
|
7
|
+
const module_1 = require("@po-ui/ng-schematics/module");
|
|
8
|
+
const project_1 = require("@po-ui/ng-schematics/project");
|
|
9
|
+
/** PO Module name that will be inserted into app root module */
|
|
10
|
+
const poStorageModuleName = 'PoStorageModule.forRoot()';
|
|
11
|
+
const poStorageModuleSourcePath = '@po-ui/ng-storage';
|
|
12
|
+
const poPoSyncModuleName = 'PoSyncModule';
|
|
13
|
+
const poPoSyncModuleSourcePath = '@po-ui/ng-sync';
|
|
14
|
+
/** HttpClient Module name that will insert in app root module */
|
|
15
|
+
const httpProvideHttpClientName = 'provideHttpClient';
|
|
16
|
+
const httpWithInterceptorsFromDiName = 'withInterceptorsFromDi';
|
|
17
|
+
const httpClientModuleSourcePath = '@angular/common/http';
|
|
18
|
+
function default_1(options) {
|
|
19
|
+
return (0, schematics_1.chain)([
|
|
20
|
+
addModuleImportToRootModuleSync(options, poStorageModuleName, poStorageModuleSourcePath),
|
|
21
|
+
addModuleImportToRootModuleSync(options, poPoSyncModuleName, poPoSyncModuleSourcePath),
|
|
22
|
+
addImportOnly(options, [httpProvideHttpClientName, httpWithInterceptorsFromDiName], httpClientModuleSourcePath),
|
|
23
|
+
addProviderToAppModule(options, 'provideHttpClient(withInterceptorsFromDi()),'),
|
|
24
|
+
updateEntryPointFileRule(options)
|
|
25
|
+
]);
|
|
26
|
+
}
|
|
27
|
+
function addModuleImportToRootModuleSync(options, moduleName, modulePath) {
|
|
28
|
+
return (host) => {
|
|
29
|
+
var _a;
|
|
30
|
+
const workspace = (_a = (0, project_1.getWorkspaceConfigGracefully)(host)) !== null && _a !== void 0 ? _a : {};
|
|
31
|
+
const project = (0, project_1.getProjectFromWorkspace)(workspace, options.project);
|
|
32
|
+
const browserEntryPoint = getProjectMainFileSync(project);
|
|
33
|
+
if (!browserEntryPoint || (0, ng_ast_utils_1.isStandaloneApp)(host, browserEntryPoint)) {
|
|
34
|
+
return host;
|
|
35
|
+
}
|
|
36
|
+
const appModulePath = (0, ng_ast_utils_1.getAppModulePath)(host, browserEntryPoint);
|
|
37
|
+
if (!(0, module_1.hasNgModuleImport)(host, appModulePath, moduleName)) {
|
|
38
|
+
(0, module_1.addModuleImportToModule)(host, appModulePath, moduleName, modulePath);
|
|
39
|
+
}
|
|
40
|
+
return host;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function addImportOnly(options, moduleNames, importPath) {
|
|
44
|
+
return (host) => {
|
|
45
|
+
var _a;
|
|
46
|
+
const workspace = (_a = (0, project_1.getWorkspaceConfigGracefully)(host)) !== null && _a !== void 0 ? _a : {};
|
|
47
|
+
const project = (0, project_1.getProjectFromWorkspace)(workspace, options.project);
|
|
48
|
+
const browserEntryPoint = getProjectMainFileSync(project);
|
|
49
|
+
if (!browserEntryPoint || (0, ng_ast_utils_1.isStandaloneApp)(host, browserEntryPoint)) {
|
|
50
|
+
return host;
|
|
51
|
+
}
|
|
52
|
+
const modulePath = (0, ng_ast_utils_1.getAppModulePath)(host, browserEntryPoint);
|
|
53
|
+
let importStatement;
|
|
54
|
+
if (Array.isArray(moduleNames)) {
|
|
55
|
+
const names = moduleNames.join(', ');
|
|
56
|
+
importStatement = `import { ${names} } from '${importPath}';\n`;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
importStatement = `import { ${moduleNames} } from '${importPath}';\n`;
|
|
60
|
+
}
|
|
61
|
+
const recorder = host.beginUpdate(modulePath);
|
|
62
|
+
recorder.insertLeft(0, importStatement);
|
|
63
|
+
host.commitUpdate(recorder);
|
|
64
|
+
return host;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function addProviderToAppModule(options, provider) {
|
|
68
|
+
return (host) => {
|
|
69
|
+
var _a;
|
|
70
|
+
const workspace = (_a = (0, project_1.getWorkspaceConfigGracefully)(host)) !== null && _a !== void 0 ? _a : {};
|
|
71
|
+
const project = (0, project_1.getProjectFromWorkspace)(workspace, options.project);
|
|
72
|
+
const browserEntryPoint = getProjectMainFileSync(project);
|
|
73
|
+
if (!browserEntryPoint || (0, ng_ast_utils_1.isStandaloneApp)(host, browserEntryPoint)) {
|
|
74
|
+
return host;
|
|
75
|
+
}
|
|
76
|
+
const appModulePath = (0, ng_ast_utils_1.getAppModulePath)(host, browserEntryPoint);
|
|
77
|
+
addProviderToModuleProvider(host, appModulePath, provider);
|
|
78
|
+
return host;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function updateEntryPointFileRule(options) {
|
|
82
|
+
const pathMain = 'src/main.ts';
|
|
83
|
+
const pathAppConfig = 'src/app/app.config.ts';
|
|
84
|
+
let pathFile;
|
|
85
|
+
let conteudoModificado;
|
|
86
|
+
return (tree) => {
|
|
87
|
+
var _a, _b;
|
|
88
|
+
const workspace = (_a = (0, project_1.getWorkspaceConfigGracefully)(tree)) !== null && _a !== void 0 ? _a : {};
|
|
89
|
+
const project = (0, project_1.getProjectFromWorkspace)(workspace, options.project);
|
|
90
|
+
const browserEntryPoint = getProjectMainFileSync(project, 'browser');
|
|
91
|
+
if (!browserEntryPoint || !(0, ng_ast_utils_1.isStandaloneApp)(tree, browserEntryPoint)) {
|
|
92
|
+
return tree;
|
|
93
|
+
}
|
|
94
|
+
if (!tree.exists(pathAppConfig)) {
|
|
95
|
+
pathFile = pathMain;
|
|
96
|
+
conteudoModificado = updateMainFile();
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
pathFile = pathAppConfig;
|
|
100
|
+
const content = ((_b = tree.read('src/app/app.config.ts')) === null || _b === void 0 ? void 0 : _b.toString('utf-8')) || '';
|
|
101
|
+
conteudoModificado = updateAppConfigFile(content);
|
|
102
|
+
}
|
|
103
|
+
tree.overwrite(pathFile, conteudoModificado);
|
|
104
|
+
return tree;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function addProviderToModuleProvider(tree, modulePath, provider) {
|
|
108
|
+
const moduleSource = (0, module_1.getSourceFile)(tree, modulePath);
|
|
109
|
+
const changes = (0, ast_utils_1.addProviderToModule)(moduleSource, modulePath, `
|
|
110
|
+
${provider}`, null);
|
|
111
|
+
return insertChanges(tree, changes, modulePath);
|
|
112
|
+
}
|
|
113
|
+
function getProjectMainFileSync(project, property = 'main') {
|
|
114
|
+
const buildOptions = (0, project_1.getProjectTargetOptions)(project, 'build');
|
|
115
|
+
if (!buildOptions[property]) {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
return buildOptions[property];
|
|
119
|
+
}
|
|
120
|
+
function insertChanges(tree, changes, modulePath) {
|
|
121
|
+
const recorder = tree.beginUpdate(modulePath);
|
|
122
|
+
changes.forEach(change => {
|
|
123
|
+
if (change) {
|
|
124
|
+
recorder.insertLeft(change.pos, change.toAdd);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
tree.commitUpdate(recorder);
|
|
128
|
+
}
|
|
129
|
+
function updateMainFile() {
|
|
130
|
+
return `
|
|
131
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
|
132
|
+
import { RouteReuseStrategy, provideRouter, withPreloading, PreloadAllModules } from '@angular/router';
|
|
133
|
+
import { IonicRouteStrategy, provideIonicAngular } from '@ionic/angular/standalone';
|
|
134
|
+
import { importProvidersFrom } from '@angular/core';
|
|
135
|
+
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
136
|
+
|
|
137
|
+
import { PoSyncModule } from '@po-ui/ng-sync';
|
|
138
|
+
import { PoStorageModule } from '@po-ui/ng-storage';
|
|
139
|
+
|
|
140
|
+
import { routes } from './app/app.routes';
|
|
141
|
+
import { AppComponent } from './app/app.component';
|
|
142
|
+
|
|
143
|
+
bootstrapApplication(AppComponent, {
|
|
144
|
+
providers: [
|
|
145
|
+
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
|
|
146
|
+
provideIonicAngular(),
|
|
147
|
+
provideRouter(routes, withPreloading(PreloadAllModules)),
|
|
148
|
+
provideHttpClient(withInterceptorsFromDi()),
|
|
149
|
+
importProvidersFrom(PoSyncModule),
|
|
150
|
+
importProvidersFrom(PoStorageModule.forRoot())
|
|
151
|
+
],
|
|
152
|
+
});`.trim();
|
|
153
|
+
}
|
|
154
|
+
function updateAppConfigFile(content) {
|
|
155
|
+
const importBlock = `
|
|
156
|
+
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
157
|
+
|
|
158
|
+
import { PoSyncModule } from '@po-ui/ng-sync';
|
|
159
|
+
import { PoStorageModule } from '@po-ui/ng-storage';
|
|
160
|
+
`;
|
|
161
|
+
const providersBlock = `
|
|
162
|
+
providers: [
|
|
163
|
+
provideRouter(routes),
|
|
164
|
+
provideHttpClient(),
|
|
165
|
+
provideZoneChangeDetection({ eventCoalescing: true }),
|
|
166
|
+
provideHttpClient(withInterceptorsFromDi()),
|
|
167
|
+
importProvidersFrom(PoSyncModule),
|
|
168
|
+
importProvidersFrom(PoStorageModule.forRoot())
|
|
169
|
+
],`;
|
|
170
|
+
const regexImport = /import {[^}]+} from '@angular\/core';/;
|
|
171
|
+
const regexProviders = /providers: \[[^\]]+\]/;
|
|
172
|
+
// Remove imports e providers existentes
|
|
173
|
+
let modifiedContent = content.replace(regexImport, '').replace(regexProviders, '');
|
|
174
|
+
// Adiciona os novos imports e providers
|
|
175
|
+
modifiedContent = modifiedContent.replace(/export const appConfig: ApplicationConfig = {/, `import { ApplicationConfig, importProvidersFrom, provideZoneChangeDetection } from '@angular/core';${importBlock}
|
|
176
|
+
export const appConfig: ApplicationConfig = {${providersBlock}`);
|
|
177
|
+
return modifiedContent.trim();
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=setup-project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup-project.js","sourceRoot":"","sources":["../../../../projects/sync/schematics/ng-add/setup-project.ts"],"names":[],"mappings":";;AAuBA,4BAQC;AA/BD,2DAA+D;AAE/D,2EAA6F;AAC7F,qEAA4E;AAE5E,wDAAwG;AACxG,0DAIsC;AAEtC,gEAAgE;AAChE,MAAM,mBAAmB,GAAG,2BAA2B,CAAC;AACxD,MAAM,yBAAyB,GAAG,mBAAmB,CAAC;AACtD,MAAM,kBAAkB,GAAG,cAAc,CAAC;AAC1C,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AAElD,iEAAiE;AACjE,MAAM,yBAAyB,GAAG,mBAAmB,CAAC;AACtD,MAAM,8BAA8B,GAAG,wBAAwB,CAAC;AAChE,MAAM,0BAA0B,GAAG,sBAAsB,CAAC;AAE1D,mBAAyB,OAAY;IACnC,OAAO,IAAA,kBAAK,EAAC;QACX,+BAA+B,CAAC,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,CAAC;QACxF,+BAA+B,CAAC,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,CAAC;QACtF,aAAa,CAAC,OAAO,EAAE,CAAC,yBAAyB,EAAE,8BAA8B,CAAC,EAAE,0BAA0B,CAAC;QAC/G,sBAAsB,CAAC,OAAO,EAAE,8CAA8C,CAAC;QAC/E,wBAAwB,CAAC,OAAO,CAAC;KAClC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,+BAA+B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IACxC,eAAe,GAAG,eAAe,CAAC,OAAO,CACvC,+CAA+C,EAC/C,sGAAsG,WAAW;+CACtE,cAAc,EAAE,CAC5D,CAAC;IAEF,OAAO,eAAe,CAAC,IAAI,EAAE,CAAC;AAChC,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
3
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
5
|
const build_file_1 = require("@po-ui/ng-schematics/build-file");
|
|
5
6
|
/** Scaffolds a new sync schema file */
|
|
6
7
|
function default_1(options) {
|
|
7
8
|
return (0, schematics_1.chain)([createSyncSchema(options)]);
|
|
8
9
|
}
|
|
9
|
-
exports.default = default_1;
|
|
10
10
|
function createSyncSchema(options) {
|
|
11
11
|
return (0, build_file_1.buildFile)(options);
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../projects/sync/schematics/ng-generate/schema/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../projects/sync/schematics/ng-generate/schema/index.ts"],"names":[],"mappings":";;AAOA,4BAEC;AATD,2DAAyD;AAEzD,gEAA4D;AAI5D,uCAAuC;AACvC,mBAAyB,OAAoB;IAC3C,OAAO,IAAA,kBAAK,EAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,gBAAgB,CAAC,OAAoB;IAC5C,OAAO,IAAA,sBAAS,EAAC,OAAO,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
3
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
5
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
6
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
6
7
|
const changes_1 = require("./changes");
|
|
7
8
|
function default_1() {
|
|
8
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.0.0-next.0', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
9
10
|
}
|
|
10
|
-
exports.default = default_1;
|
|
11
11
|
function postUpdate() {
|
|
12
12
|
return (_, context) => {
|
|
13
13
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../projects/sync/schematics/ng-update/v14/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../projects/sync/schematics/ng-update/v14/index.ts"],"names":[],"mappings":";;AAOA,4BAEC;AATD,2DAA2E;AAC3E,4DAA0E;AAE1E,wEAAwE;AAExE,uCAAqD;AAErD;IACE,OAAO,IAAA,kBAAK,EAAC,CAAC,IAAA,kCAAiB,EAAC,mBAAmB,EAAE,kCAAwB,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;AACjG,CAAC;AAED,SAAS,UAAU;IACjB,OAAO,CAAC,CAAO,EAAE,OAAyB,EAAE,EAAE;QAC5C,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;IAChD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
3
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
5
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
6
|
const ng_ast_utils_1 = require("@schematics/angular/utility/ng-ast-utils");
|
|
@@ -8,9 +9,8 @@ const module_1 = require("@po-ui/ng-schematics/module");
|
|
|
8
9
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
9
10
|
const changes_1 = require("./changes");
|
|
10
11
|
function default_1() {
|
|
11
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('
|
|
12
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.0.0-next.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
12
13
|
}
|
|
13
|
-
exports.default = default_1;
|
|
14
14
|
function postUpdate() {
|
|
15
15
|
return (_, context) => {
|
|
16
16
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../projects/sync/schematics/ng-update/v15/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../projects/sync/schematics/ng-update/v15/index.ts"],"names":[],"mappings":";;AAYA,4BAEC;AAdD,2DAA2E;AAC3E,4DAA0E;AAC1E,2EAA4E;AAE5E,0DAAgG;AAChG,wDAAsE;AAGtE,wEAAwE;AAExE,uCAAuG;AAEvG;IACE,OAAO,IAAA,kBAAK,EAAC,CAAC,IAAA,kCAAiB,EAAC,mBAAmB,EAAE,kCAAwB,CAAC,EAAE,iBAAiB,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;AACtH,CAAC;AAED,SAAS,UAAU;IACjB,OAAO,CAAC,CAAO,EAAE,OAAyB,EAAE,EAAE;QAC5C,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;IAChD,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB;IACxB,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;;QAC/C,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC9B,MAAM,SAAS,GAAG,MAAA,IAAA,sCAA4B,EAAC,IAAI,CAAC,mCAAK,EAAsB,CAAC;QAEhF,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;YACvB,MAAM,CAAC,KAAK,CAAC,oEAAoE,CAAC,CAAC;YACnF,OAAO;QACT,CAAC;QAED,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QACrD,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;YACvC,MAAM,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;YAEhD,MAAM,aAAa,GAAG,IAAA,+BAAgB,EAAC,IAAI,EAAE,IAAA,4BAAkB,EAAC,OAAO,CAAC,CAAC,CAAC;YAE1E,kCAAkC;YAClC,IAAA,gCAAuB,EAAC,IAAI,EAAE,aAAa,EAAE,8BAAoB,EAAE,oCAA0B,CAAC,CAAC;QACjG,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
3
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
5
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
6
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
6
7
|
const changes_1 = require("./changes");
|
|
7
8
|
function default_1() {
|
|
8
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.0.0-next.0', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
9
10
|
}
|
|
10
|
-
exports.default = default_1;
|
|
11
11
|
function postUpdate() {
|
|
12
12
|
return (_, context) => {
|
|
13
13
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../projects/sync/schematics/ng-update/v16/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../projects/sync/schematics/ng-update/v16/index.ts"],"names":[],"mappings":";;AAOA,4BAEC;AATD,2DAA2E;AAC3E,4DAA0E;AAE1E,wEAAwE;AAExE,uCAAqD;AAErD;IACE,OAAO,IAAA,kBAAK,EAAC,CAAC,IAAA,kCAAiB,EAAC,mBAAmB,EAAE,kCAAwB,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;AACjG,CAAC;AAED,SAAS,UAAU;IACjB,OAAO,CAAC,CAAO,EAAE,OAAyB,EAAE,EAAE;QAC5C,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;IAChD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
3
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
5
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
6
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
6
7
|
const changes_1 = require("./changes");
|
|
7
8
|
function default_1() {
|
|
8
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.0.0-next.0', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
9
10
|
}
|
|
10
|
-
exports.default = default_1;
|
|
11
11
|
function postUpdate() {
|
|
12
12
|
return (_, context) => {
|
|
13
13
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../projects/sync/schematics/ng-update/v17/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../projects/sync/schematics/ng-update/v17/index.ts"],"names":[],"mappings":";;AAOA,4BAEC;AATD,2DAA2E;AAC3E,4DAA0E;AAE1E,wEAAwE;AAExE,uCAAqD;AAErD;IACE,OAAO,IAAA,kBAAK,EAAC,CAAC,IAAA,kCAAiB,EAAC,mBAAmB,EAAE,kCAAwB,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;AACjG,CAAC;AAED,SAAS,UAAU;IACjB,OAAO,CAAC,CAAO,EAAE,OAAyB,EAAE,EAAE;QAC5C,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;IAChD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
3
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
5
|
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
6
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
6
7
|
const changes_1 = require("./changes");
|
|
7
8
|
function default_1() {
|
|
8
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.0.0-next.0', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
9
10
|
}
|
|
10
|
-
exports.default = default_1;
|
|
11
11
|
function postUpdate() {
|
|
12
12
|
return (_, context) => {
|
|
13
13
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../projects/sync/schematics/ng-update/v18/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../projects/sync/schematics/ng-update/v18/index.ts"],"names":[],"mappings":";;AAOA,4BAEC;AATD,2DAA2E;AAC3E,4DAA0E;AAE1E,wEAAwE;AAExE,uCAAqD;AAErD;IACE,OAAO,IAAA,kBAAK,EAAC,CAAC,IAAA,kCAAiB,EAAC,mBAAmB,EAAE,kCAAwB,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;AACjG,CAAC;AAED,SAAS,UAAU;IACjB,OAAO,CAAC,CAAO,EAAE,OAAyB,EAAE,EAAE;QAC5C,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;IAChD,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateDepedenciesVersion = void 0;
|
|
4
|
+
exports.updateDepedenciesVersion = {
|
|
5
|
+
dependencies: [
|
|
6
|
+
'@po-ui/ng-components',
|
|
7
|
+
'@po-ui/ng-code-editor',
|
|
8
|
+
'@po-ui/ng-templates',
|
|
9
|
+
'@po-ui/ng-storage',
|
|
10
|
+
'@po-ui/ng-sync',
|
|
11
|
+
'@po-ui/style'
|
|
12
|
+
]
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=changes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changes.js","sourceRoot":"","sources":["../../../../../projects/sync/schematics/ng-update/v19/changes.ts"],"names":[],"mappings":";;;AAEa,QAAA,wBAAwB,GAAuB;IAC1D,YAAY,EAAE;QACZ,sBAAsB;QACtB,uBAAuB;QACvB,qBAAqB;QACrB,mBAAmB;QACnB,gBAAgB;QAChB,cAAc;KACf;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): import("@angular-devkit/schematics").Rule;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = default_1;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
6
|
+
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
7
|
+
const changes_1 = require("./changes");
|
|
8
|
+
function default_1() {
|
|
9
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('19.0.0-next.0', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
10
|
+
}
|
|
11
|
+
function postUpdate() {
|
|
12
|
+
return (_, context) => {
|
|
13
|
+
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=index.js.map
|