@taqueria/plugin-metadata 0.42.3 → 0.42.6
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 +1 -138
- package/package.json +3 -3
- package/_readme.eta +0 -145
package/README.md
CHANGED
|
@@ -2,141 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
The Taqueria Metadata plugin provides an easy way to create a json file containing `TZIP-16` compliant metadata related to a smart contract
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- Taqueria v0.26.0 or later
|
|
8
|
-
- Node.js v16.16 or later. (v17.x.x or later is not supported)
|
|
9
|
-
|
|
10
|
-
## Installation
|
|
11
|
-
|
|
12
|
-
To install the metadata plugin on a Taqueria project, navigate to the project folder and run:
|
|
13
|
-
```shell
|
|
14
|
-
taq install @taqueria/plugin-metadata
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Configuration
|
|
18
|
-
|
|
19
|
-
There is no configuration required to run the plugin
|
|
20
|
-
|
|
21
|
-
## Usage
|
|
22
|
-
|
|
23
|
-
The Metadata plugin provides an interactive CLI interface that collects basic contract metadata fields as outlined in `TZIP-16` [specification](https://gitlab.com/tezos/tzip/-/blob/master/proposals/tzip-16/tzip-16.md), and generates a compliant JSON file that can be uploaded to IPFS
|
|
24
|
-
|
|
25
|
-
The metadata fields collected are:
|
|
26
|
-
|
|
27
|
-
| name | description |
|
|
28
|
-
|:-----------------:|:-------------------------------------:|
|
|
29
|
-
| name | Name of the contract |
|
|
30
|
-
| version | Version of the contract |
|
|
31
|
-
| description | Description of the contract |
|
|
32
|
-
| authors | List of authors |
|
|
33
|
-
| homepage | Homepage associated with the contract |
|
|
34
|
-
| license | Type of license e. g. ISC, MIT |
|
|
35
|
-
| interfaces | List of interfaces |
|
|
36
|
-
|
|
37
|
-
To save time in multi-contract projects, `taq generate-project-metadata` can be run. This will collect project level metadata fields which are then provided as the default values for each subsequent invocation of `taq generate-metadata <contractName>`
|
|
38
|
-
|
|
39
|
-
The plugin exposes two tasks:
|
|
40
|
-
- `taq generate-metadata <contractName>` - Generates `TZIP-16` compliant metadata for a contract in JSON format
|
|
41
|
-
- `taq generate-project-metadata` - Generates project level metadata that is written to `.taq/config.json`
|
|
42
|
-
|
|
43
|
-
Contract metadata is output into a JSON file in the `artifacts` directory, while project metadata is added to `.taq/config.json` as seen here:
|
|
44
|
-
|
|
45
|
-
```json
|
|
46
|
-
"metadata": {
|
|
47
|
-
"name": "string",
|
|
48
|
-
"projectDescription": "string",
|
|
49
|
-
"authors": [
|
|
50
|
-
"string",
|
|
51
|
-
"string"
|
|
52
|
-
],
|
|
53
|
-
"homepage": "url",
|
|
54
|
-
"license": "string"
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Tasks
|
|
59
|
-
|
|
60
|
-
### `taq generate-metadata <contractName>`
|
|
61
|
-
|
|
62
|
-
The `generate-metadata` task starts an interactive interface that collects the relavent fields via CLI prompts and outputs a `TZIP-16` compliant metadata file in JSON format
|
|
63
|
-
|
|
64
|
-
> ### :page_with_curl: Note
|
|
65
|
-
> The contract may, or may not exist yet
|
|
66
|
-
|
|
67
|
-
#### Command Structure
|
|
68
|
-
|
|
69
|
-
```shell
|
|
70
|
-
taq generate-metadata <contractName>
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
#### Options
|
|
74
|
-
|
|
75
|
-
The metadata `generate-metadata` task will accept the following required parameters:
|
|
76
|
-
|
|
77
|
-
| name | description |
|
|
78
|
-
|:-------------|--------------------------------------------------------------------|
|
|
79
|
-
| contractName | The contract name (the contract may exist, or may not exist) |
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
#### Task Properties
|
|
83
|
-
|
|
84
|
-
| attribute | value |
|
|
85
|
-
|------------|:---------------------------------------:|
|
|
86
|
-
| task | 'generate-metadata' |
|
|
87
|
-
| command | 'generate-metadata < contractName >' |
|
|
88
|
-
| aliases | N/A |
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
### `taq generate-project-metadata`
|
|
92
|
-
|
|
93
|
-
The `generate-project-metadata` task collects project-level metadata fields which are added to `config.json`. Once generated, these values will be used as defaults when generating contract metadata
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
#### Command Structure
|
|
97
|
-
|
|
98
|
-
```shell
|
|
99
|
-
taq generate-project-metadata
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
#### Options
|
|
103
|
-
|
|
104
|
-
The `generate-project-metadata` task not not have any additional parameters or options
|
|
105
|
-
|
|
106
|
-
#### Task Properties
|
|
107
|
-
|
|
108
|
-
| attribute | value |
|
|
109
|
-
|:----------:|:---------------------------------------:|
|
|
110
|
-
| task | 'generate-project-metadata' |
|
|
111
|
-
| command | 'generate-project-metadata' |
|
|
112
|
-
| aliases | N/A |
|
|
113
|
-
|
|
114
|
-
## Behaviour
|
|
115
|
-
|
|
116
|
-
The user flow for each task is outlined below
|
|
117
|
-
|
|
118
|
-
### Generating or updating a metadata file for a contract
|
|
119
|
-
|
|
120
|
-
- Prompt the user for standard metadata fields, providing default values
|
|
121
|
-
- If metadata already exists for a contract, it will use existing values as the default prompt values
|
|
122
|
-
- If contractName is not provided, it will prompt for contractName
|
|
123
|
-
- For a new contract metadata, it will find other contracts metadata and use those for the default values for common fields like authors, license, homepage this eliminates an extra step to define/register project metadata, but project metadata will be used as a priority if available
|
|
124
|
-
|
|
125
|
-
### Generating project metadata
|
|
126
|
-
|
|
127
|
-
- Add the project metadata to `.taq/config.json`
|
|
128
|
-
- Add the project metadata schema
|
|
129
|
-
|
|
130
|
-
### Default Value Priority
|
|
131
|
-
|
|
132
|
-
Summary of priority for default values:
|
|
133
|
-
- 1st Priority: Previous Values
|
|
134
|
-
- 2nd Priority: Project Values
|
|
135
|
-
- 3rd Priority: Existing Contract Metadata Values
|
|
136
|
-
- 4th Priority: Other Contract Values
|
|
137
|
-
|
|
138
|
-
## Plugin Architecture
|
|
139
|
-
|
|
140
|
-
This is a plugin developed for Taqueria built on NodeJS using the Taqueria Node SDK and distributed via NPM
|
|
141
|
-
|
|
142
|
-
|
|
5
|
+
For more information, please see our documentation for the [Metadata plugin](https://taqueria.io/docs/plugins/plugin-metadata/)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taqueria/plugin-metadata",
|
|
3
|
-
"version": "0.42.
|
|
3
|
+
"version": "0.42.6",
|
|
4
4
|
"description": "A plugin for Taqueria providing metadata creation and validation.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"taqueria",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"directory": "taqueria-plugin-metadata"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@taqueria/node-sdk": "^0.42.
|
|
35
|
-
"@taqueria/protocol": "^0.42.
|
|
34
|
+
"@taqueria/node-sdk": "^0.42.6",
|
|
35
|
+
"@taqueria/protocol": "^0.42.6",
|
|
36
36
|
"prompts": "^2.4.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
package/_readme.eta
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
<% if (it.output == "github") { %>
|
|
2
|
-
# Taqueria Metadata Plugin
|
|
3
|
-
<% } %>
|
|
4
|
-
|
|
5
|
-
The Taqueria Metadata plugin provides an easy way to create a json file containing `TZIP-16` compliant metadata related to a smart contract
|
|
6
|
-
|
|
7
|
-
## Requirements
|
|
8
|
-
|
|
9
|
-
- Taqueria v0.26.0 or later
|
|
10
|
-
- Node.js v16.16 or later. (v17.x.x or later is not supported)
|
|
11
|
-
|
|
12
|
-
## Installation
|
|
13
|
-
|
|
14
|
-
To install the metadata plugin on a Taqueria project, navigate to the project folder and run:
|
|
15
|
-
```shell
|
|
16
|
-
taq install @taqueria/plugin-metadata
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Configuration
|
|
20
|
-
|
|
21
|
-
There is no configuration required to run the plugin
|
|
22
|
-
|
|
23
|
-
## Usage
|
|
24
|
-
|
|
25
|
-
The Metadata plugin provides an interactive CLI interface that collects basic contract metadata fields as outlined in `TZIP-16` [specification](https://gitlab.com/tezos/tzip/-/blob/master/proposals/tzip-16/tzip-16.md), and generates a compliant JSON file that can be uploaded to IPFS
|
|
26
|
-
|
|
27
|
-
The metadata fields collected are:
|
|
28
|
-
|
|
29
|
-
| name | description |
|
|
30
|
-
|:-----------------:|:-------------------------------------:|
|
|
31
|
-
| name | Name of the contract |
|
|
32
|
-
| version | Version of the contract |
|
|
33
|
-
| description | Description of the contract |
|
|
34
|
-
| authors | List of authors |
|
|
35
|
-
| homepage | Homepage associated with the contract |
|
|
36
|
-
| license | Type of license e. g. ISC, MIT |
|
|
37
|
-
| interfaces | List of interfaces |
|
|
38
|
-
|
|
39
|
-
To save time in multi-contract projects, `taq generate-project-metadata` can be run. This will collect project level metadata fields which are then provided as the default values for each subsequent invocation of `taq generate-metadata <contractName>`
|
|
40
|
-
|
|
41
|
-
The plugin exposes two tasks:
|
|
42
|
-
- `taq generate-metadata <contractName>` - Generates `TZIP-16` compliant metadata for a contract in JSON format
|
|
43
|
-
- `taq generate-project-metadata` - Generates project level metadata that is written to `.taq/config.json`
|
|
44
|
-
|
|
45
|
-
Contract metadata is output into a JSON file in the `artifacts` directory, while project metadata is added to `.taq/config.json` as seen here:
|
|
46
|
-
|
|
47
|
-
```json
|
|
48
|
-
"metadata": {
|
|
49
|
-
"name": "string",
|
|
50
|
-
"projectDescription": "string",
|
|
51
|
-
"authors": [
|
|
52
|
-
"string",
|
|
53
|
-
"string"
|
|
54
|
-
],
|
|
55
|
-
"homepage": "url",
|
|
56
|
-
"license": "string"
|
|
57
|
-
}
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Tasks
|
|
61
|
-
|
|
62
|
-
### `taq generate-metadata <contractName>`
|
|
63
|
-
|
|
64
|
-
The `generate-metadata` task starts an interactive interface that collects the relavent fields via CLI prompts and outputs a `TZIP-16` compliant metadata file in JSON format
|
|
65
|
-
|
|
66
|
-
<%~ it.noteOpenAdmonition %>
|
|
67
|
-
The contract may, or may not exist yet
|
|
68
|
-
<%= it.closeAdmonition %>
|
|
69
|
-
|
|
70
|
-
#### Command Structure
|
|
71
|
-
|
|
72
|
-
```shell
|
|
73
|
-
taq generate-metadata <contractName>
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
#### Options
|
|
77
|
-
|
|
78
|
-
The metadata `generate-metadata` task will accept the following required parameters:
|
|
79
|
-
|
|
80
|
-
| name | description |
|
|
81
|
-
|:-------------|--------------------------------------------------------------------|
|
|
82
|
-
| contractName | The contract name (the contract may exist, or may not exist) |
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
#### Task Properties
|
|
86
|
-
|
|
87
|
-
| attribute | value |
|
|
88
|
-
|------------|:---------------------------------------:|
|
|
89
|
-
| task | 'generate-metadata' |
|
|
90
|
-
| command | 'generate-metadata < contractName >' |
|
|
91
|
-
| aliases | N/A |
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
### `taq generate-project-metadata`
|
|
95
|
-
|
|
96
|
-
The `generate-project-metadata` task collects project-level metadata fields which are added to `config.json`. Once generated, these values will be used as defaults when generating contract metadata
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
#### Command Structure
|
|
100
|
-
|
|
101
|
-
```shell
|
|
102
|
-
taq generate-project-metadata
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
#### Options
|
|
106
|
-
|
|
107
|
-
The `generate-project-metadata` task not not have any additional parameters or options
|
|
108
|
-
|
|
109
|
-
#### Task Properties
|
|
110
|
-
|
|
111
|
-
| attribute | value |
|
|
112
|
-
|:----------:|:---------------------------------------:|
|
|
113
|
-
| task | 'generate-project-metadata' |
|
|
114
|
-
| command | 'generate-project-metadata' |
|
|
115
|
-
| aliases | N/A |
|
|
116
|
-
|
|
117
|
-
## Behaviour
|
|
118
|
-
|
|
119
|
-
The user flow for each task is outlined below
|
|
120
|
-
|
|
121
|
-
### Generating or updating a metadata file for a contract
|
|
122
|
-
|
|
123
|
-
- Prompt the user for standard metadata fields, providing default values
|
|
124
|
-
- If metadata already exists for a contract, it will use existing values as the default prompt values
|
|
125
|
-
- If contractName is not provided, it will prompt for contractName
|
|
126
|
-
- For a new contract metadata, it will find other contracts metadata and use those for the default values for common fields like authors, license, homepage this eliminates an extra step to define/register project metadata, but project metadata will be used as a priority if available
|
|
127
|
-
|
|
128
|
-
### Generating project metadata
|
|
129
|
-
|
|
130
|
-
- Add the project metadata to `.taq/config.json`
|
|
131
|
-
- Add the project metadata schema
|
|
132
|
-
|
|
133
|
-
### Default Value Priority
|
|
134
|
-
|
|
135
|
-
Summary of priority for default values:
|
|
136
|
-
- 1st Priority: Previous Values
|
|
137
|
-
- 2nd Priority: Project Values
|
|
138
|
-
- 3rd Priority: Existing Contract Metadata Values
|
|
139
|
-
- 4th Priority: Other Contract Values
|
|
140
|
-
|
|
141
|
-
## Plugin Architecture
|
|
142
|
-
|
|
143
|
-
This is a plugin developed for Taqueria built on NodeJS using the Taqueria Node SDK and distributed via NPM
|
|
144
|
-
|
|
145
|
-
|