@po-ui/ng-sync 16.0.0 → 16.2.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 +22 -22
- package/esm2022/lib/index.mjs +1 -1
- package/esm2022/lib/models/index.mjs +1 -1
- package/esm2022/lib/models/po-data-message.model.mjs +1 -1
- package/esm2022/lib/models/po-data-transform.model.mjs +1 -1
- package/esm2022/lib/models/po-entity/po-entity.model.mjs +1 -1
- package/esm2022/lib/models/po-event-sourcing-error-response.model.mjs +1 -1
- package/esm2022/lib/models/po-network-status.model.mjs +1 -1
- package/esm2022/lib/models/po-network-type.enum.mjs +1 -1
- package/esm2022/lib/models/po-query-builder/po-query-builder.model.mjs +1 -1
- package/esm2022/lib/models/po-request-type.enum.mjs +1 -1
- package/esm2022/lib/po-sync.module.mjs +1 -1
- package/esm2022/lib/services/po-event-sourcing/enums/po-event-sourcing-operation.enum.mjs +1 -1
- package/esm2022/lib/services/po-event-sourcing/index.mjs +1 -1
- package/esm2022/lib/services/po-event-sourcing/interfaces/po-event-sourcing-item.interface.mjs +1 -1
- package/esm2022/lib/services/po-event-sourcing/interfaces/po-event-sourcing-summary-item.interface.mjs +1 -1
- package/esm2022/lib/services/po-event-sourcing/po-event-sourcing.service.mjs +1 -1
- package/esm2022/lib/services/po-http-client/interfaces/po-http-header-option.interface.mjs +1 -1
- package/esm2022/lib/services/po-http-client/interfaces/po-http-request-data.interface.mjs +1 -1
- package/esm2022/lib/services/po-http-client/interfaces/po-response-api.interface.mjs +1 -1
- package/esm2022/lib/services/po-http-client/po-http-client.service.mjs +1 -1
- package/esm2022/lib/services/po-http-client/po-http-request-type.enum.mjs +1 -1
- package/esm2022/lib/services/po-network/po-network.service.mjs +1 -1
- package/esm2022/lib/services/po-schema/index.mjs +1 -1
- package/esm2022/lib/services/po-schema/po-schema-definition/po-schema-definition.service.mjs +1 -1
- package/esm2022/lib/services/po-schema/po-schema-util/po-schema-util.model.mjs +1 -1
- package/esm2022/lib/services/po-schema/po-schema.service.mjs +1 -1
- package/esm2022/lib/services/po-sync/interfaces/po-sync-config.interface.mjs +1 -1
- package/esm2022/lib/services/po-sync/interfaces/po-sync-field-options.interface.mjs +1 -1
- package/esm2022/lib/services/po-sync/interfaces/po-sync-response.interface.mjs +1 -1
- package/esm2022/lib/services/po-sync/interfaces/po-sync-schema.interface.mjs +1 -1
- package/esm2022/lib/services/po-sync/po-sync.service.mjs +1 -1
- package/esm2022/lib/utils/utils.mjs +1 -1
- package/esm2022/public-api.mjs +1 -1
- package/fesm2022/po-ui-ng-sync.mjs.map +1 -1
- package/package.json +4 -4
- package/po-ui-ng-sync-16.2.0.tgz +0 -0
- package/schematics/README.md +169 -169
- package/schematics/collection.json +15 -15
- package/schematics/migrations.json +45 -45
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/schema.json +16 -16
- package/schematics/ng-generate/schema/files/__path__/__name@dasherize__/__name@dasherize__.constants.ts.template +13 -13
- package/schematics/ng-generate/schema/schema.json +31 -31
- package/schematics/ng-update/v14/index.js +1 -1
- package/schematics/ng-update/v15/index.js +1 -1
- package/schematics/ng-update/v16/index.js +1 -1
- package/schematics/ng-update/v2/index.js +1 -1
- package/schematics/ng-update/v3/index.js +1 -1
- package/schematics/ng-update/v4/index.js +1 -1
- package/schematics/ng-update/v5/index.js +1 -1
- package/schematics/ng-update/v6/index.js +1 -1
- package/po-ui-ng-sync-16.0.0.tgz +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@po-ui/ng-sync",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.2.0",
|
|
4
4
|
"tag": "next",
|
|
5
5
|
"description": "PO UI - Sync",
|
|
6
6
|
"author": "PO UI",
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@capacitor/core": "^4.1.0",
|
|
23
23
|
"@capacitor/network": "^4.1.0",
|
|
24
|
-
"@po-ui/ng-storage": "16.
|
|
24
|
+
"@po-ui/ng-storage": "16.2.0",
|
|
25
25
|
"http-status-codes": "^2.1.4",
|
|
26
|
-
"@po-ui/ng-schematics": "16.
|
|
26
|
+
"@po-ui/ng-schematics": "16.2.0",
|
|
27
27
|
"tslib": "^2.3.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@angular/core": "~16.2.0",
|
|
31
31
|
"@capacitor/core": "^4.1.0",
|
|
32
32
|
"@capacitor/network": "^4.1.0",
|
|
33
|
-
"@po-ui/ng-storage": "16.
|
|
33
|
+
"@po-ui/ng-storage": "16.2.0",
|
|
34
34
|
"http-status-codes": "^2.1.4",
|
|
35
35
|
"rxjs": "~7.5.5",
|
|
36
36
|
"rxjs-compat": "~6.6.0",
|
|
Binary file
|
package/schematics/README.md
CHANGED
|
@@ -1,169 +1,169 @@
|
|
|
1
|
-
# PO UI Sync
|
|
2
|
-
|
|
3
|
-
## Modo desenvolvimento
|
|
4
|
-
|
|
5
|
-
Para desenvolver novos schematics ou alterá-los é necessário executar o comando abaixo na raiz do projeto:
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
~ <caminho_do_repositorio>/po-angular
|
|
9
|
-
|
|
10
|
-
> npm run build:schematics
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Após executar o comando será criado a pasta `dist/ng-schematics` e você estará apto a utilizar a biblioteca
|
|
14
|
-
em modo de desenvolvimento para implementar novas melhorias/correções e etc.
|
|
15
|
-
|
|
16
|
-
# ng update @po-ui/ng-sync
|
|
17
|
-
|
|
18
|
-
Esse *schematic* é executado através do Angular CLI para oferecer suporte à atualização automática do PO UI em um projeto Angular.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
### Como funciona
|
|
22
|
-
|
|
23
|
-
No arquivo ```npm/@po-ui/ng-sync/package.json ```, é declarado a chave `ng-update`. Isso indica ao Angular CLI que este projeto possui um conjunto de *schematics* de migração.
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
"ng-update": {
|
|
27
|
-
"migrations": "./schematics/migrations.json",
|
|
28
|
-
"packageGroup": [
|
|
29
|
-
"@po-ui/ng-sync"
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Quando os schematics forem analisados, ele tentará determinar se algum script de migração deve ser executado com base nas definições. As definições de migração podem ser encontradas em nosso arquivo `projects/sync/schematics/src/migration.json`. A execução `ng update` procurará scripts com base nesta coleção. Veja documentação do Angular sobre [ng-update](https://github.com/angular/angular-cli/blob/master/docs/specifications/update.md).
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
### Como testar
|
|
38
|
-
|
|
39
|
-
Para poder testar localmente é necessário instalar [verdaccio](https://github.com/verdaccio/verdaccio), para termos um *npm registry* local,
|
|
40
|
-
onde publicaremos os pacotes para realizar o teste.
|
|
41
|
-
|
|
42
|
-
Após a instalação, devemos apontar o npm registry para o que iniciaremos localmente.
|
|
43
|
-
|
|
44
|
-
O comando abaixo subirá o npm local, no endereço http://localhost:4873.
|
|
45
|
-
|
|
46
|
-
``` > verdaccio ```
|
|
47
|
-
|
|
48
|
-
Em seguida, definiremos o *npm registry*, conforme o comando abaixo:
|
|
49
|
-
|
|
50
|
-
``` > npm set registry http://localhost:4873 ```
|
|
51
|
-
|
|
52
|
-
A partir de agora, os pacotes que publicaremos serão enviados ao nosso registry local.
|
|
53
|
-
|
|
54
|
-
> Para utilizar *npm registry* global novamente, execute o comando: `npm set registry https://registry.npmjs.org/`.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
Antes de testarmos o pacotes, devemos fazer duas configurações, são elas:
|
|
58
|
-
|
|
59
|
-
- Adicionar dentro do arquivo ```verdaccio/config.yaml``` a configuração: `max_body_size: 200mb`;
|
|
60
|
-
- Executar o comando: ``` npm adduser --registry http://localhost:4873 ```
|
|
61
|
-
|
|
62
|
-
Para testarmos o pacote, devemos incrementar a versão do mesmo,
|
|
63
|
-
caso for uma versão beta devemos alterar a versão também no arquivo `migrations.json`,
|
|
64
|
-
ter o npm registry local em execução, confirmando essas situações, podemos rodar o script abaixo:
|
|
65
|
-
|
|
66
|
-
`> npm run build:schematics`
|
|
67
|
-
`> npm run build:storage`
|
|
68
|
-
`> npm run build:sync`
|
|
69
|
-
|
|
70
|
-
`> npm run publish:sync:local`
|
|
71
|
-
`> npm run publish:storage:local`
|
|
72
|
-
`> npm run publish:schematics:local`
|
|
73
|
-
|
|
74
|
-
Por fim, execute os comandos abaixo no seu projeto Angular:
|
|
75
|
-
|
|
76
|
-
`> ng update @po-ui/ng-sync --next`
|
|
77
|
-
|
|
78
|
-
Pode ser utilizado o verdaccio para publicar os pacotes locais, como `@po-ui/ng-sync`, assim não precisamos instalar local e o fluxo fica mais próximo do oficial.
|
|
79
|
-
|
|
80
|
-
Se você precisar executar isso várias vezes, desfaça as alterações feitas pelo `ng update` para que o `package.json` volte ao número da versão original e execute `npm install` novamente antes de tentar outra atualização.
|
|
81
|
-
|
|
82
|
-
# ng add @po-ui/ng-sync
|
|
83
|
-
|
|
84
|
-
Esse *schematic* é executado através do Angular CLI para adicionar o sync em projetos Ionic.
|
|
85
|
-
|
|
86
|
-
## Como testar
|
|
87
|
-
|
|
88
|
-
Há duas possibilidades para execução de testes para os novos *schematics*:
|
|
89
|
-
|
|
90
|
-
### 1 - npm link
|
|
91
|
-
|
|
92
|
-
O comando **npm link** criará um link simbólico do pacote que deseja testar dentro do `node_modules` da aplicação. Desta forma, é possível executar *schematics* do `po-sync` diretamente em `./projects/app/src/app`.
|
|
93
|
-
|
|
94
|
-
Primeiramente, é necessária a alteração em `angular.json`:
|
|
95
|
-
|
|
96
|
-
```
|
|
97
|
-
...
|
|
98
|
-
"defaultProject": "app"
|
|
99
|
-
...
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Executar o build do projeto `po-schematic`, `po-sync` e `po-storage`:
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
> npm run build:schematics
|
|
106
|
-
> npm run build:storage
|
|
107
|
-
> npm run build:sync
|
|
108
|
-
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
Agora executaremos o comando de link:
|
|
112
|
-
|
|
113
|
-
```
|
|
114
|
-
> npm link dist/ng-sync
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Por fim, executando o comando abaixo, o pacote `po-sync` será instalados e também serão adicionados os módulos `PoStorageModule` e `PoSyncModule` em `app.module.ts`:
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
> ng generate @po-ui/ng-sync:ng-add
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
> Pra remover posteriormente o pacote `po-sync` do `node_modules` execute `npm uninstall @po-ui/ng-sync`.
|
|
124
|
-
|
|
125
|
-
### 2 - verdaccio
|
|
126
|
-
|
|
127
|
-
Para poder testar localmente é necessário instalar [verdaccio](https://github.com/verdaccio/verdaccio), para termos um *npm registry* local,
|
|
128
|
-
onde publicaremos os pacotes para realizar o teste.
|
|
129
|
-
|
|
130
|
-
Após a instalação, devemos apontar o npm registry para o que iniciaremos localmente.
|
|
131
|
-
|
|
132
|
-
O comando abaixo subirá o npm local, no endereço http://localhost:4873.
|
|
133
|
-
|
|
134
|
-
```
|
|
135
|
-
> verdaccio
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
Em seguida, definiremos o *npm registry*, conforme o comando abaixo:
|
|
139
|
-
|
|
140
|
-
```
|
|
141
|
-
> npm set registry http://localhost:4873
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
A partir de agora, os pacotes que publicaremos serão enviados ao nosso registry local.
|
|
145
|
-
|
|
146
|
-
> Para utilizar *npm registry* global novamente, execute o comando: `npm set registry https://registry.npmjs.org/`.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
Antes de testarmos o pacotes, devemos fazer duas configurações, são elas:
|
|
150
|
-
|
|
151
|
-
- Adicionar dentro do arquivo ```verdaccio/config.yaml``` a configuração: `max_body_size: 200mb`;
|
|
152
|
-
- Executar o comando: ``` npm adduser --registry http://localhost:4873 ```
|
|
153
|
-
|
|
154
|
-
Para testarmos o pacote, devemos incrementar a versão do mesmo e ter o npm registry local em execução. confirmando essas situações, podemos rodar o script abaixo:
|
|
155
|
-
|
|
156
|
-
```
|
|
157
|
-
> npm run build:schematics && npm run build:storage && npm run build:sync && npm run publish:sync:local && npm run publish:storage:local && npm run publish:schematics:local
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
```
|
|
161
|
-
> npm dist-tags add @po-ui/ng-sync@versaoTeste && npm dist-tags add @po-ui/ng-storage@versaoTeste && npm dist-tags add @po-ui/ng-schematics@versaoTeste
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
Por fim, execute os comando abaixo no seu projeto Angular:
|
|
166
|
-
|
|
167
|
-
```
|
|
168
|
-
> ng add @po-ui/ng-sync
|
|
169
|
-
```
|
|
1
|
+
# PO UI Sync
|
|
2
|
+
|
|
3
|
+
## Modo desenvolvimento
|
|
4
|
+
|
|
5
|
+
Para desenvolver novos schematics ou alterá-los é necessário executar o comando abaixo na raiz do projeto:
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
~ <caminho_do_repositorio>/po-angular
|
|
9
|
+
|
|
10
|
+
> npm run build:schematics
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Após executar o comando será criado a pasta `dist/ng-schematics` e você estará apto a utilizar a biblioteca
|
|
14
|
+
em modo de desenvolvimento para implementar novas melhorias/correções e etc.
|
|
15
|
+
|
|
16
|
+
# ng update @po-ui/ng-sync
|
|
17
|
+
|
|
18
|
+
Esse *schematic* é executado através do Angular CLI para oferecer suporte à atualização automática do PO UI em um projeto Angular.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Como funciona
|
|
22
|
+
|
|
23
|
+
No arquivo ```npm/@po-ui/ng-sync/package.json ```, é declarado a chave `ng-update`. Isso indica ao Angular CLI que este projeto possui um conjunto de *schematics* de migração.
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
"ng-update": {
|
|
27
|
+
"migrations": "./schematics/migrations.json",
|
|
28
|
+
"packageGroup": [
|
|
29
|
+
"@po-ui/ng-sync"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Quando os schematics forem analisados, ele tentará determinar se algum script de migração deve ser executado com base nas definições. As definições de migração podem ser encontradas em nosso arquivo `projects/sync/schematics/src/migration.json`. A execução `ng update` procurará scripts com base nesta coleção. Veja documentação do Angular sobre [ng-update](https://github.com/angular/angular-cli/blob/master/docs/specifications/update.md).
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Como testar
|
|
38
|
+
|
|
39
|
+
Para poder testar localmente é necessário instalar [verdaccio](https://github.com/verdaccio/verdaccio), para termos um *npm registry* local,
|
|
40
|
+
onde publicaremos os pacotes para realizar o teste.
|
|
41
|
+
|
|
42
|
+
Após a instalação, devemos apontar o npm registry para o que iniciaremos localmente.
|
|
43
|
+
|
|
44
|
+
O comando abaixo subirá o npm local, no endereço http://localhost:4873.
|
|
45
|
+
|
|
46
|
+
``` > verdaccio ```
|
|
47
|
+
|
|
48
|
+
Em seguida, definiremos o *npm registry*, conforme o comando abaixo:
|
|
49
|
+
|
|
50
|
+
``` > npm set registry http://localhost:4873 ```
|
|
51
|
+
|
|
52
|
+
A partir de agora, os pacotes que publicaremos serão enviados ao nosso registry local.
|
|
53
|
+
|
|
54
|
+
> Para utilizar *npm registry* global novamente, execute o comando: `npm set registry https://registry.npmjs.org/`.
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
Antes de testarmos o pacotes, devemos fazer duas configurações, são elas:
|
|
58
|
+
|
|
59
|
+
- Adicionar dentro do arquivo ```verdaccio/config.yaml``` a configuração: `max_body_size: 200mb`;
|
|
60
|
+
- Executar o comando: ``` npm adduser --registry http://localhost:4873 ```
|
|
61
|
+
|
|
62
|
+
Para testarmos o pacote, devemos incrementar a versão do mesmo,
|
|
63
|
+
caso for uma versão beta devemos alterar a versão também no arquivo `migrations.json`,
|
|
64
|
+
ter o npm registry local em execução, confirmando essas situações, podemos rodar o script abaixo:
|
|
65
|
+
|
|
66
|
+
`> npm run build:schematics`
|
|
67
|
+
`> npm run build:storage`
|
|
68
|
+
`> npm run build:sync`
|
|
69
|
+
|
|
70
|
+
`> npm run publish:sync:local`
|
|
71
|
+
`> npm run publish:storage:local`
|
|
72
|
+
`> npm run publish:schematics:local`
|
|
73
|
+
|
|
74
|
+
Por fim, execute os comandos abaixo no seu projeto Angular:
|
|
75
|
+
|
|
76
|
+
`> ng update @po-ui/ng-sync --next`
|
|
77
|
+
|
|
78
|
+
Pode ser utilizado o verdaccio para publicar os pacotes locais, como `@po-ui/ng-sync`, assim não precisamos instalar local e o fluxo fica mais próximo do oficial.
|
|
79
|
+
|
|
80
|
+
Se você precisar executar isso várias vezes, desfaça as alterações feitas pelo `ng update` para que o `package.json` volte ao número da versão original e execute `npm install` novamente antes de tentar outra atualização.
|
|
81
|
+
|
|
82
|
+
# ng add @po-ui/ng-sync
|
|
83
|
+
|
|
84
|
+
Esse *schematic* é executado através do Angular CLI para adicionar o sync em projetos Ionic.
|
|
85
|
+
|
|
86
|
+
## Como testar
|
|
87
|
+
|
|
88
|
+
Há duas possibilidades para execução de testes para os novos *schematics*:
|
|
89
|
+
|
|
90
|
+
### 1 - npm link
|
|
91
|
+
|
|
92
|
+
O comando **npm link** criará um link simbólico do pacote que deseja testar dentro do `node_modules` da aplicação. Desta forma, é possível executar *schematics* do `po-sync` diretamente em `./projects/app/src/app`.
|
|
93
|
+
|
|
94
|
+
Primeiramente, é necessária a alteração em `angular.json`:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
...
|
|
98
|
+
"defaultProject": "app"
|
|
99
|
+
...
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Executar o build do projeto `po-schematic`, `po-sync` e `po-storage`:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
> npm run build:schematics
|
|
106
|
+
> npm run build:storage
|
|
107
|
+
> npm run build:sync
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Agora executaremos o comando de link:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
> npm link dist/ng-sync
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Por fim, executando o comando abaixo, o pacote `po-sync` será instalados e também serão adicionados os módulos `PoStorageModule` e `PoSyncModule` em `app.module.ts`:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
> ng generate @po-ui/ng-sync:ng-add
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
> Pra remover posteriormente o pacote `po-sync` do `node_modules` execute `npm uninstall @po-ui/ng-sync`.
|
|
124
|
+
|
|
125
|
+
### 2 - verdaccio
|
|
126
|
+
|
|
127
|
+
Para poder testar localmente é necessário instalar [verdaccio](https://github.com/verdaccio/verdaccio), para termos um *npm registry* local,
|
|
128
|
+
onde publicaremos os pacotes para realizar o teste.
|
|
129
|
+
|
|
130
|
+
Após a instalação, devemos apontar o npm registry para o que iniciaremos localmente.
|
|
131
|
+
|
|
132
|
+
O comando abaixo subirá o npm local, no endereço http://localhost:4873.
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
> verdaccio
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Em seguida, definiremos o *npm registry*, conforme o comando abaixo:
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
> npm set registry http://localhost:4873
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
A partir de agora, os pacotes que publicaremos serão enviados ao nosso registry local.
|
|
145
|
+
|
|
146
|
+
> Para utilizar *npm registry* global novamente, execute o comando: `npm set registry https://registry.npmjs.org/`.
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
Antes de testarmos o pacotes, devemos fazer duas configurações, são elas:
|
|
150
|
+
|
|
151
|
+
- Adicionar dentro do arquivo ```verdaccio/config.yaml``` a configuração: `max_body_size: 200mb`;
|
|
152
|
+
- Executar o comando: ``` npm adduser --registry http://localhost:4873 ```
|
|
153
|
+
|
|
154
|
+
Para testarmos o pacote, devemos incrementar a versão do mesmo e ter o npm registry local em execução. confirmando essas situações, podemos rodar o script abaixo:
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
> npm run build:schematics && npm run build:storage && npm run build:sync && npm run publish:sync:local && npm run publish:storage:local && npm run publish:schematics:local
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
> npm dist-tags add @po-ui/ng-sync@versaoTeste && npm dist-tags add @po-ui/ng-storage@versaoTeste && npm dist-tags add @po-ui/ng-schematics@versaoTeste
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
Por fim, execute os comando abaixo no seu projeto Angular:
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
> ng add @po-ui/ng-sync
|
|
169
|
+
```
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
|
-
"schematics": {
|
|
4
|
-
"ng-add": {
|
|
5
|
-
"description": "Add my library to the project.",
|
|
6
|
-
"factory": "./ng-add/index",
|
|
7
|
-
"schema": "./ng-add/schema.json"
|
|
8
|
-
},
|
|
9
|
-
"schema": {
|
|
10
|
-
"description": "Create a schema to sync a entity ",
|
|
11
|
-
"factory": "./ng-generate/schema/index",
|
|
12
|
-
"schema": "./ng-generate/schema/schema.json"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
|
+
"schematics": {
|
|
4
|
+
"ng-add": {
|
|
5
|
+
"description": "Add my library to the project.",
|
|
6
|
+
"factory": "./ng-add/index",
|
|
7
|
+
"schema": "./ng-add/schema.json"
|
|
8
|
+
},
|
|
9
|
+
"schema": {
|
|
10
|
+
"description": "Create a schema to sync a entity ",
|
|
11
|
+
"factory": "./ng-generate/schema/index",
|
|
12
|
+
"schema": "./ng-generate/schema/schema.json"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
|
-
"schematics": {
|
|
4
|
-
"migration-v2": {
|
|
5
|
-
"version": "2",
|
|
6
|
-
"description": "Atualiza @po-ui/ng-sync para v2",
|
|
7
|
-
"factory": "./ng-update/v2/index#updateToV2"
|
|
8
|
-
},
|
|
9
|
-
"migration-v3": {
|
|
10
|
-
"version": "3",
|
|
11
|
-
"description": "Atualiza @po-ui/ng-sync para v3",
|
|
12
|
-
"factory": "./ng-update/v3/index#updateToV3"
|
|
13
|
-
},
|
|
14
|
-
"migration-v4": {
|
|
15
|
-
"version": "4",
|
|
16
|
-
"description": "Atualiza @po-ui/ng-sync para v4",
|
|
17
|
-
"factory": "./ng-update/v4/index"
|
|
18
|
-
},
|
|
19
|
-
"migration-v5": {
|
|
20
|
-
"version": "5",
|
|
21
|
-
"description": "Atualiza @po-ui/ng-sync para v5",
|
|
22
|
-
"factory": "./ng-update/v5/index"
|
|
23
|
-
},
|
|
24
|
-
"migration-v6": {
|
|
25
|
-
"version": "6",
|
|
26
|
-
"description": "Atualiza @po-ui/ng-sync para v6",
|
|
27
|
-
"factory": "./ng-update/v6/index"
|
|
28
|
-
},
|
|
29
|
-
"migration-v14": {
|
|
30
|
-
"version": "14",
|
|
31
|
-
"description": "Atualiza @po-ui/ng-sync para v14",
|
|
32
|
-
"factory": "./ng-update/v14/index"
|
|
33
|
-
},
|
|
34
|
-
"migration-v15": {
|
|
35
|
-
"version": "16.
|
|
36
|
-
"description": "Atualiza @po-ui/ng-sync para v15",
|
|
37
|
-
"factory": "./ng-update/v15/index"
|
|
38
|
-
},
|
|
39
|
-
"migration-v16": {
|
|
40
|
-
"version": "16.
|
|
41
|
-
"description": "Atualiza @po-ui/ng-sync para v16",
|
|
42
|
-
"factory": "./ng-update/v16/index"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
|
+
"schematics": {
|
|
4
|
+
"migration-v2": {
|
|
5
|
+
"version": "2",
|
|
6
|
+
"description": "Atualiza @po-ui/ng-sync para v2",
|
|
7
|
+
"factory": "./ng-update/v2/index#updateToV2"
|
|
8
|
+
},
|
|
9
|
+
"migration-v3": {
|
|
10
|
+
"version": "3",
|
|
11
|
+
"description": "Atualiza @po-ui/ng-sync para v3",
|
|
12
|
+
"factory": "./ng-update/v3/index#updateToV3"
|
|
13
|
+
},
|
|
14
|
+
"migration-v4": {
|
|
15
|
+
"version": "4",
|
|
16
|
+
"description": "Atualiza @po-ui/ng-sync para v4",
|
|
17
|
+
"factory": "./ng-update/v4/index"
|
|
18
|
+
},
|
|
19
|
+
"migration-v5": {
|
|
20
|
+
"version": "5",
|
|
21
|
+
"description": "Atualiza @po-ui/ng-sync para v5",
|
|
22
|
+
"factory": "./ng-update/v5/index"
|
|
23
|
+
},
|
|
24
|
+
"migration-v6": {
|
|
25
|
+
"version": "6",
|
|
26
|
+
"description": "Atualiza @po-ui/ng-sync para v6",
|
|
27
|
+
"factory": "./ng-update/v6/index"
|
|
28
|
+
},
|
|
29
|
+
"migration-v14": {
|
|
30
|
+
"version": "14",
|
|
31
|
+
"description": "Atualiza @po-ui/ng-sync para v14",
|
|
32
|
+
"factory": "./ng-update/v14/index"
|
|
33
|
+
},
|
|
34
|
+
"migration-v15": {
|
|
35
|
+
"version": "16.2.0",
|
|
36
|
+
"description": "Atualiza @po-ui/ng-sync para v15",
|
|
37
|
+
"factory": "./ng-update/v15/index"
|
|
38
|
+
},
|
|
39
|
+
"migration-v16": {
|
|
40
|
+
"version": "16.2.0",
|
|
41
|
+
"description": "Atualiza @po-ui/ng-sync para v16",
|
|
42
|
+
"factory": "./ng-update/v16/index"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -24,7 +24,7 @@ function default_1(options) {
|
|
|
24
24
|
exports.default = default_1;
|
|
25
25
|
function addPoPackageAndInstall() {
|
|
26
26
|
return (tree, context) => {
|
|
27
|
-
(0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-sync', '16.
|
|
27
|
+
(0, package_config_1.addPackageToPackageJson)(tree, '@po-ui/ng-sync', '16.2.0');
|
|
28
28
|
// install packages
|
|
29
29
|
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
30
30
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"$id": "SchematicsNgAdd",
|
|
4
|
-
"title": "Ng Add Options Schema",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"project": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "Name of the project.",
|
|
10
|
-
"$default": {
|
|
11
|
-
"$source": "projectName"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"required": []
|
|
16
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "SchematicsNgAdd",
|
|
4
|
+
"title": "Ng Add Options Schema",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"project": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Name of the project.",
|
|
10
|
+
"$default": {
|
|
11
|
+
"$source": "projectName"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"required": []
|
|
16
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { PoSyncSchema } from '@po-ui/ng-sync';
|
|
2
|
-
|
|
3
|
-
export const <%= name %>Schema: PoSyncSchema = {
|
|
4
|
-
getUrlApi:
|
|
5
|
-
'http://localhost:8080/<%= name %>',
|
|
6
|
-
diffUrlApi:
|
|
7
|
-
'http://localhost:8080/<%= name %>/diff',
|
|
8
|
-
deletedField: 'deleted',
|
|
9
|
-
fields: ['id', 'title', 'location', 'description'],
|
|
10
|
-
idField: 'id',
|
|
11
|
-
name: '<%= name %>',
|
|
12
|
-
pageSize: 1,
|
|
13
|
-
};
|
|
1
|
+
import { PoSyncSchema } from '@po-ui/ng-sync';
|
|
2
|
+
|
|
3
|
+
export const <%= name %>Schema: PoSyncSchema = {
|
|
4
|
+
getUrlApi:
|
|
5
|
+
'http://localhost:8080/<%= name %>',
|
|
6
|
+
diffUrlApi:
|
|
7
|
+
'http://localhost:8080/<%= name %>/diff',
|
|
8
|
+
deletedField: 'deleted',
|
|
9
|
+
fields: ['id', 'title', 'location', 'description'],
|
|
10
|
+
idField: 'id',
|
|
11
|
+
name: '<%= name %>',
|
|
12
|
+
pageSize: 1,
|
|
13
|
+
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"$id": "SchematicsPOSyncSchema",
|
|
4
|
-
"title": "Sync Schema Options Schema",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"name": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "The name to use for the sync schema",
|
|
10
|
-
"$default": {
|
|
11
|
-
"$source": "argv",
|
|
12
|
-
"index": 0
|
|
13
|
-
},
|
|
14
|
-
"x-prompt": "What name would you like to use for the sync schema?"
|
|
15
|
-
},
|
|
16
|
-
"path": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"format": "path",
|
|
19
|
-
"description": "The path at which to create the component file, relative to the current workspace. Default is a folder with the same name as the component in the project root.",
|
|
20
|
-
"visible": false
|
|
21
|
-
},
|
|
22
|
-
"project": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"description": "The name of the project.",
|
|
25
|
-
"$default": {
|
|
26
|
-
"$source": "projectName"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"required": ["name"]
|
|
31
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "SchematicsPOSyncSchema",
|
|
4
|
+
"title": "Sync Schema Options Schema",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"name": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "The name to use for the sync schema",
|
|
10
|
+
"$default": {
|
|
11
|
+
"$source": "argv",
|
|
12
|
+
"index": 0
|
|
13
|
+
},
|
|
14
|
+
"x-prompt": "What name would you like to use for the sync schema?"
|
|
15
|
+
},
|
|
16
|
+
"path": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"format": "path",
|
|
19
|
+
"description": "The path at which to create the component file, relative to the current workspace. Default is a folder with the same name as the component in the project root.",
|
|
20
|
+
"visible": false
|
|
21
|
+
},
|
|
22
|
+
"project": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "The name of the project.",
|
|
25
|
+
"$default": {
|
|
26
|
+
"$source": "projectName"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"required": ["name"]
|
|
31
|
+
}
|
|
@@ -5,7 +5,7 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
|
5
5
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
6
6
|
const changes_1 = require("./changes");
|
|
7
7
|
function default_1() {
|
|
8
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('16.
|
|
8
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('16.2.0', changes_1.updateDepedenciesVersion), postUpdate()]);
|
|
9
9
|
}
|
|
10
10
|
exports.default = default_1;
|
|
11
11
|
function postUpdate() {
|
|
@@ -8,7 +8,7 @@ const module_1 = require("@po-ui/ng-schematics/module");
|
|
|
8
8
|
const package_config_1 = require("@po-ui/ng-schematics/package-config");
|
|
9
9
|
const changes_1 = require("./changes");
|
|
10
10
|
function default_1() {
|
|
11
|
-
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('16.
|
|
11
|
+
return (0, schematics_1.chain)([(0, package_config_1.updatePackageJson)('16.2.0', changes_1.updateDepedenciesVersion), createUpgradeRule(), postUpdate()]);
|
|
12
12
|
}
|
|
13
13
|
exports.default = default_1;
|
|
14
14
|
function postUpdate() {
|