@assinafy/piece-assinafy 0.1.0 → 0.1.1
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/CHANGELOG.md +4 -0
- package/LICENSE +1 -25
- package/README.md +12 -19
- package/README.pt-BR.md +12 -19
- package/package.json +7 -9
- package/src/index.js +18 -10
package/CHANGELOG.md
CHANGED
package/LICENSE
CHANGED
|
@@ -240,7 +240,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
240
240
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
241
241
|
SOFTWARE.
|
|
242
242
|
|
|
243
|
-
## es-object-atoms@1.1.
|
|
243
|
+
## es-object-atoms@1.1.2 (MIT)
|
|
244
244
|
|
|
245
245
|
MIT License
|
|
246
246
|
|
|
@@ -452,30 +452,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
452
452
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
453
453
|
SOFTWARE.
|
|
454
454
|
|
|
455
|
-
## hasown@2.0.3 (MIT)
|
|
456
|
-
|
|
457
|
-
MIT License
|
|
458
|
-
|
|
459
|
-
Copyright (c) Jordan Harband and contributors
|
|
460
|
-
|
|
461
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
462
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
463
|
-
in the Software without restriction, including without limitation the rights
|
|
464
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
465
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
466
|
-
furnished to do so, subject to the following conditions:
|
|
467
|
-
|
|
468
|
-
The above copyright notice and this permission notice shall be included in all
|
|
469
|
-
copies or substantial portions of the Software.
|
|
470
|
-
|
|
471
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
472
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
473
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
474
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
475
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
476
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
477
|
-
SOFTWARE.
|
|
478
|
-
|
|
479
455
|
## hasown@2.0.4 (MIT)
|
|
480
456
|
|
|
481
457
|
MIT License
|
package/README.md
CHANGED
|
@@ -183,18 +183,18 @@ Document outputs:
|
|
|
183
183
|
|
|
184
184
|
## Development
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
Requirements: Node.js 24 LTS and Git.
|
|
187
187
|
|
|
188
188
|
```sh
|
|
189
|
-
|
|
190
|
-
npx turbo run build --filter=@assinafy/piece-assinafy
|
|
191
|
-
npx turbo run lint --filter=@assinafy/piece-assinafy
|
|
192
|
-
cd packages/pieces/community/assinafy
|
|
189
|
+
npm install # also downloads the Activepieces libraries
|
|
193
190
|
npm run typecheck # source and tests
|
|
194
191
|
npm test # unit tests, no network
|
|
195
192
|
npm run test:coverage # with coverage thresholds
|
|
193
|
+
npm run build # bundles the piece into dist/
|
|
196
194
|
```
|
|
197
195
|
|
|
196
|
+
The piece is built against the Activepieces piece framework at the commit in `ACTIVEPIECES_REF`. `npm install` downloads the framework, common and core libraries from that commit into `.activepieces/`, and the build bundles them into a single file. To build against a newer Activepieces, change `ACTIVEPIECES_REF`, run `npm install` and run the tests.
|
|
197
|
+
|
|
198
198
|
Unit tests mock the HTTP client and block any real network request. One upload test runs the real Activepieces HTTP client against a stubbed `fetch` to check the multipart request on the wire.
|
|
199
199
|
|
|
200
200
|
### Implementation notes
|
|
@@ -230,35 +230,28 @@ ASSINAFY_API_KEY=<sandbox key> npm run test:live
|
|
|
230
230
|
|
|
231
231
|
The suite also reads a document's activity log, which **Document Signed** relies on.
|
|
232
232
|
|
|
233
|
-
### Try it in
|
|
233
|
+
### Try it in Activepieces
|
|
234
234
|
|
|
235
|
-
|
|
235
|
+
Run `npm run build`, then `npm pack ./dist` to create a `.tgz` file. In Activepieces, open **Setup → Pieces** in the platform admin, click **Install Piece**, choose **Packed Archive (.tgz)** and upload the file.
|
|
236
236
|
|
|
237
237
|
### Translations
|
|
238
238
|
|
|
239
239
|
`src/i18n/translation.json` is generated from the piece and `src/i18n/pt.json` holds the Brazilian Portuguese strings. After changing any display name, description or option label:
|
|
240
240
|
|
|
241
241
|
```sh
|
|
242
|
-
npm run
|
|
242
|
+
npm run translations
|
|
243
243
|
```
|
|
244
244
|
|
|
245
|
-
|
|
245
|
+
Then update `pt.json`. The tests fail while either file is out of date.
|
|
246
246
|
|
|
247
247
|
Activepieces does not translate the connection dialog of a piece with more than one connection type, so the dialog is shown in English.
|
|
248
248
|
|
|
249
249
|
### Publishing
|
|
250
250
|
|
|
251
251
|
1. Bump `version` in `package.json` (patch for new actions, optional inputs and fixes; major for removals, new required inputs or changed behavior) and add the release to `CHANGELOG.md`.
|
|
252
|
-
2. Run `npm run licenses
|
|
253
|
-
3.
|
|
254
|
-
4.
|
|
255
|
-
|
|
256
|
-
```sh
|
|
257
|
-
TS_NODE_TRANSPILE_ONLY=true npm_config_dry_run=true npm run publish-piece assinafy # check the package, publishes nothing
|
|
258
|
-
TS_NODE_TRANSPILE_ONLY=true npm run publish-piece assinafy
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
`TS_NODE_TRANSPILE_ONLY=true` skips an unrelated type error elsewhere in the repository that stops the script. The script builds the piece, bundles it into a single file with the Activepieces libraries inlined, checks that no workspace or `@activepieces/*` dependency is left, and publishes it with public access together with the READMEs, `LICENSE` and `CHANGELOG.md`. It skips a version that is already on npm, so bump the version before publishing changes.
|
|
252
|
+
2. Run `npm run licenses`. It rewrites `LICENSE` with the license of every package bundled into the published file.
|
|
253
|
+
3. Check the package with `npm run build && npm publish ./dist --dry-run`.
|
|
254
|
+
4. Commit, push to `main`, and push a `piece-assinafy-vX.Y.Z` tag that matches the version. The **Publish Assinafy piece** workflow typechecks, tests and builds the piece, then publishes it to npm through trusted publishing, together with the READMEs, `LICENSE` and `CHANGELOG.md`.
|
|
262
255
|
|
|
263
256
|
Never rename an action, trigger or input after release: flows reference them by name.
|
|
264
257
|
|
package/README.pt-BR.md
CHANGED
|
@@ -183,18 +183,18 @@ Saídas de **Novo Evento (Instantâneo)**:
|
|
|
183
183
|
|
|
184
184
|
## Desenvolvimento
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
Requisitos: Node.js 24 LTS e Git.
|
|
187
187
|
|
|
188
188
|
```sh
|
|
189
|
-
|
|
190
|
-
npx turbo run build --filter=@assinafy/piece-assinafy
|
|
191
|
-
npx turbo run lint --filter=@assinafy/piece-assinafy
|
|
192
|
-
cd packages/pieces/community/assinafy
|
|
189
|
+
npm install # também baixa as bibliotecas do Activepieces
|
|
193
190
|
npm run typecheck # código e testes
|
|
194
191
|
npm test # testes unitários, sem rede
|
|
195
192
|
npm run test:coverage # com limites de cobertura
|
|
193
|
+
npm run build # gera o pacote da peça em dist/
|
|
196
194
|
```
|
|
197
195
|
|
|
196
|
+
A peça é compilada com o framework de peças do Activepieces no commit indicado em `ACTIVEPIECES_REF`. O `npm install` baixa as bibliotecas framework, common e core desse commit para `.activepieces/`, e o build as embute em um único arquivo. Para compilar com um Activepieces mais recente, altere o `ACTIVEPIECES_REF`, execute `npm install` e rode os testes.
|
|
197
|
+
|
|
198
198
|
Os testes unitários simulam o cliente HTTP e bloqueiam qualquer acesso real à rede. Um teste de envio usa o cliente HTTP real do Activepieces com um `fetch` simulado para verificar a requisição multipart enviada.
|
|
199
199
|
|
|
200
200
|
### Notas de implementação
|
|
@@ -230,35 +230,28 @@ ASSINAFY_API_KEY=<chave do sandbox> npm run test:live
|
|
|
230
230
|
|
|
231
231
|
O conjunto também lê o histórico de atividades de um documento, do qual **Documento Assinado** depende.
|
|
232
232
|
|
|
233
|
-
### Testar
|
|
233
|
+
### Testar no Activepieces
|
|
234
234
|
|
|
235
|
-
|
|
235
|
+
Execute `npm run build` e depois `npm pack ./dist` para gerar um arquivo `.tgz`. No Activepieces, abra **Setup → Pieces** na administração da plataforma, clique em **Install Piece**, escolha **Packed Archive (.tgz)** e envie o arquivo.
|
|
236
236
|
|
|
237
237
|
### Traduções
|
|
238
238
|
|
|
239
239
|
`src/i18n/translation.json` é gerado a partir da peça e `src/i18n/pt.json` contém os textos em português do Brasil. Depois de alterar qualquer nome, descrição ou rótulo de opção:
|
|
240
240
|
|
|
241
241
|
```sh
|
|
242
|
-
npm run
|
|
242
|
+
npm run translations
|
|
243
243
|
```
|
|
244
244
|
|
|
245
|
-
|
|
245
|
+
Depois atualize o `pt.json`. Os testes falham enquanto algum dos dois arquivos estiver desatualizado.
|
|
246
246
|
|
|
247
247
|
O Activepieces não traduz a janela de conexão de uma peça com mais de um tipo de conexão, então essa janela aparece em inglês.
|
|
248
248
|
|
|
249
249
|
### Publicação
|
|
250
250
|
|
|
251
251
|
1. Aumente a `version` no `package.json` (patch para novas ações, entradas opcionais e correções; major para remoções, novas entradas obrigatórias ou mudança de comportamento) e registre a versão no `CHANGELOG.md`.
|
|
252
|
-
2. Execute `npm run licenses
|
|
253
|
-
3.
|
|
254
|
-
4.
|
|
255
|
-
|
|
256
|
-
```sh
|
|
257
|
-
TS_NODE_TRANSPILE_ONLY=true npm_config_dry_run=true npm run publish-piece assinafy # confere o pacote, não publica nada
|
|
258
|
-
TS_NODE_TRANSPILE_ONLY=true npm run publish-piece assinafy
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
`TS_NODE_TRANSPILE_ONLY=true` ignora um erro de tipos não relacionado em outra parte do repositório que interrompe o script. O script compila a peça, gera um único arquivo com as bibliotecas do Activepieces embutidas, verifica que não sobrou nenhuma dependência de workspace ou `@activepieces/*` e publica com acesso público junto com os READMEs, o `LICENSE` e o `CHANGELOG.md`. Uma versão que já está no npm é ignorada, então aumente a versão antes de publicar alterações.
|
|
252
|
+
2. Execute `npm run licenses`. Ele reescreve o `LICENSE` com a licença de cada pacote embutido no arquivo publicado.
|
|
253
|
+
3. Confira o pacote com `npm run build && npm publish ./dist --dry-run`.
|
|
254
|
+
4. Faça o commit, envie para a `main` e envie uma tag `piece-assinafy-vX.Y.Z` igual à versão. O workflow **Publish Assinafy piece** verifica os tipos, roda os testes, gera o pacote e o publica no npm por trusted publishing, junto com os READMEs, o `LICENSE` e o `CHANGELOG.md`.
|
|
262
255
|
|
|
263
256
|
Nunca renomeie uma ação, gatilho ou entrada depois de publicada: os fluxos os referenciam pelo nome.
|
|
264
257
|
|
package/package.json
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assinafy/piece-assinafy",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Activepieces piece for Assinafy electronic signatures.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Assinafy",
|
|
7
|
-
"homepage": "https://github.com/assinafy/activepieces
|
|
7
|
+
"homepage": "https://github.com/assinafy/activepieces#readme",
|
|
8
8
|
"bugs": {
|
|
9
9
|
"url": "https://github.com/assinafy/activepieces/issues"
|
|
10
10
|
},
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "git+https://github.com/assinafy/activepieces.git"
|
|
14
|
-
"directory": "packages/pieces/community/assinafy"
|
|
13
|
+
"url": "git+https://github.com/assinafy/activepieces.git"
|
|
15
14
|
},
|
|
16
15
|
"keywords": [
|
|
17
16
|
"activepieces",
|
|
@@ -23,11 +22,10 @@
|
|
|
23
22
|
"dependencies": {},
|
|
24
23
|
"files": [
|
|
25
24
|
"src/index.js",
|
|
26
|
-
"package.json",
|
|
27
25
|
"src/i18n",
|
|
28
|
-
"CHANGELOG.md",
|
|
29
|
-
"LICENSE",
|
|
30
26
|
"README.md",
|
|
31
|
-
"README.pt-BR.md"
|
|
27
|
+
"README.pt-BR.md",
|
|
28
|
+
"CHANGELOG.md",
|
|
29
|
+
"LICENSE"
|
|
32
30
|
]
|
|
33
|
-
}
|
|
31
|
+
}
|