@gregoriusrippenstein/node-red-contrib-nodedev 0.3.5 → 0.3.7

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 CHANGED
@@ -12,6 +12,8 @@ So this package tries to provide some supporting nodes for making node developme
12
12
  - A `NpmTarball` node will create a gzipped tarball for uploading to [npmjs.com](https://npmjs.com) where all nodes live. This does not need to have since nodes can be installed localling into the Node-RED instance.
13
13
  - A `NRInstall` node allows for installing the node package into the Node-RED instance in which the flow is running. This means that nodes can be created, tested and modified with Node-RED. There are a few tricks so that Node-RED does not need to be restarted upon updating the package, more below.
14
14
  - A `NodeFactory` node that can create templates for node development. It also converts existing `.tgz` packages to `PkgFile` nodes, meaning that existing packages can easily be ported to this style of development.
15
+ - A `NpmPublish` allows node packages to be published to a node registry, for example [npmjs](https://www.npmjs.com/). The NpmPublish can also be used to publish to private registries, for example, those based on [Verdaccio](https://verdaccio.org/).
16
+ - A `OTPGenerate` node can be used to generate an One Time Password (OTP) for publishing nodes to registries. For example the NPMjs.com registry.
15
17
 
16
18
  *This is all very confusing?*
17
19
 
@@ -52,6 +54,8 @@ Examples are included:
52
54
 
53
55
  - Converting an existing tar-gzip package file into a collection of `PkgFile` nodes for testing and maintaince and development --> [flow](https://flowhub.org/f/eef4037a6d25a1e0)
54
56
  - `NodeFactory` example of creating a boilerplate node for inclusion in a node package that can be installed into Node-RED --> [flow](https://flowhub.org/f/7bece6814c033925)
57
+ - The [FlowHub node package](https://flowhub.org/f/4a831589774ecb04) is developed using the NodeDev nodes
58
+ - Also the [introspection node package](https://flowhub.org/f/d73d76db3df96ba2) uses the NodeDev nodes
55
59
 
56
60
  ### Config node with sidebar
57
61
 
@@ -190,7 +190,8 @@ module.exports = function (RED) {
190
190
  }
191
191
 
192
192
  pacote.manifest(
193
- msg.pkgname + "@" + msg.pkgversion
193
+ msg.pkgname + "@" + msg.pkgversion,
194
+ { registry: msg.pkgregistry || 'https://registry.npmjs.org' }
194
195
  ).then(manifest => {
195
196
  RED.comms.publish(
196
197
  "nodedev:perform-autoimport-nodes",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name" : "@gregoriusrippenstein/node-red-contrib-nodedev",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "dependencies": {
5
5
  "pako": "^2.1.0",
6
6
  "tar-stream": "^3.1.6",
@@ -41,7 +41,8 @@
41
41
 
42
42
  data: JSON.stringify({
43
43
  pkgname: $("#node-input-nodefactorysidebar-package-name").val().trim(),
44
- pkgversion: $("#node-input-nodefactorysidebar-package-version").val().trim()
44
+ pkgversion: $("#node-input-nodefactorysidebar-package-version").val().trim(),
45
+ pkgregistry: $("#node-input-nodefactorysidebar-package-registry").val().trim()
45
46
  }),
46
47
 
47
48
  success: function (resp) {
@@ -210,6 +211,18 @@
210
211
  })
211
212
  $("#node-input-nodefactorysidebar-package-name").val(globalYourConfigNode.pkgname);
212
213
 
214
+ $("#node-input-nodefactorysidebar-package-registry").on("change", function() {
215
+ ensureYourConfigNodeExists();
216
+
217
+ let data = $(this).val();
218
+
219
+ if (globalYourConfigNode.pkgregistry != data) {
220
+ globalYourConfigNode.pkgregistry = data.trim();
221
+ RED.nodes.dirty(true);
222
+ }
223
+ })
224
+ $("#node-input-nodefactorysidebar-package-registry").val(globalYourConfigNode.pkgregistry);
225
+
213
226
  /*
214
227
  ************* OTP generator handlers
215
228
  */
@@ -370,6 +383,15 @@
370
383
  placeholder="3.5.0">
371
384
  </div>
372
385
 
386
+ <div class="form-row" style="margin-left: 10px;">
387
+ <label for="node-input-nodefactorysidebar-package-registry">
388
+ <i class="fa fa-tag"></i>
389
+ Registry
390
+ </label>
391
+ <input type="text" id="node-input-nodefactorysidebar-package-registry"
392
+ placeholder="https://registry.npmjs.org">
393
+ </div>
394
+
373
395
  <div class="form-row">
374
396
  <div style="position: relative; height: 100%; margin: 15px;">
375
397
  <button id="node-input-nodefactorysidebar-generate-btn"