chore: migrate to new react-native-async storage package

Please verify the following:

[x] yarn ci:test jest tests pass with new tests, if relevant
[x] README.md has been updated with your changes, if relevant

Describe your PR
react-native-async-storage has moved away from react-native-community and into it's own organization, so we are currently pointing to a deprecated package. This PR updates all references to react-native-async-storage to use the new location at https://github.com/react-native-async-storage/async-storage. There are no breaking changes from my testing.

@harrisrobin just a though but since we have unimodules integrates - we could just use: https://docs.expo.io/versions/v40.0.0/sdk/async-storage/

@harrisrobin just a though but since we have unimodules integrates - we could just use: https://docs.expo.io/versions/v40.0.0/sdk/async-storage/

@harrisrobin just a though but since we have unimodules integrated - we could just use: https://docs.expo.io/versions/v40.0.0/sdk/async-storage/

I like that idea. will look into it tomorrow

@harrisrobin just a though but since we have unimodules integrated - we could just use: https://docs.expo.io/versions/v40.0.0/sdk/async-storage/

I like that idea. will look into it tomorrow

@yulolimum @jamonholmgren after looking at this again, seems like Expo simply points to @react-native-async-storage/async-storage so I believe there is nothing else to do here 😄


change a way to check download oldest to newest

Hi
Could you made it check files from newest to oldest when do download by member or list?
Sometime I dont want to wasting time for checking from oldest and keep showing downloaded until do download newest one.
If I enable "checkupdatedlimit" at very low, it should skipped to next member without download the the newest one?

checkUpdatedLimit will allow you to set the number of images that already downloaded before it moves to the next member, setting it to 0 will disable this feature (e.g. it will check all available images).

you made it check files from newest to oldest when do download by member or list?

It is checking by newest images first. It will iterate from the 1st page (newest works) to the last page.
I don't think they changed the work ordering, right? Newest work always shown first in the website.


Upgrade to latest RNV

Task

https://github.com/flexn-io/create/issues/193

What has been done:

[x]  android - compiles and runs
[x]  ios - compiles and runs
[x]  androidtv - compiles and runs
[x]  firetv - compiles and runs
[x]  web - compiles and runs
[x]  webos - compiles and runs  in hosted mode
[x]  tvos - compiles and runs
[x]  tizen - compiles and runs in hosted mode
[x]  macos - compiles and runs
[x] Heavily updated focus engine
[x] Upgrade to<EMAIL_ADDRESS>[x] Lightning needs to be removed
[x] Icons doesn't work on tvos
[x] rnv new command tested and works with above platforms
[x] Test webos, tizen on device
[x] Move neccesarry overides to plugins repo

Non blocking issues, observations:

Chromecast not tested
Move new create plugins definitions to plugins repo(Can be done after mergint to main)
After running web you initially see Hydration error that's known rnv issue
These fonts overrides needs to be part of renative same as ios https://github.com/flexn-io/create/blob/feat/rnv_update/packages/template-starter/appConfigs/base/builds/tvos/RNVApp-tvOS/Info.plist#L36
This override had to be added in order androidtv to autostart https://github.com/flexn-io/create/blob/feat/rnv_update/packages/template-starter/renative.json#L321. Has to be checked also from rnv side

tvos has no icons

androidTV jumps down after clicking right on carousels page
https://github.com/flexn-io/create/assets/65670660/2f1df630-e871-467c-8509-6bf9c70147c6
On all tv’s TV drawer remains open after opening home or carousels from TV drawer
Carousels screen is not displayed in full screen on webos and on tizen

modal has no background on webos, tizen modal is all black

focus is lost on carousel page when you go back from details screen on webos and tizen. Not first item in row must be opened in order to reproduce
https://github.com/flexn-io/create/assets/65670660/0ea75aaf-6dd8-4f0c-a88e-baba02b1474f
on webos and tizen devices black blank screen is displayed after splash screen (renative issue?)
no app icon on tvos

tizen black screen for few s after clicking on item from carousels

"My Modal" title doesn't fit in one line on drawer on webos and tizen sim

When testing this PR please link with another one in https://github.com/flexn-io/renative/pull/1523

1.3.0-feat-rnv-update.17

tizen -> carousels, details, modal screens scrolls up/down
webos (device) -> black screen after splash screen
tvos -> no app icon

1.3.0-feat-rnv-update.19
webos -> Can't scroll up/down carousels page


replace Collections.sort with tabula.Utils.sort where possible

fixes #116 in the case I encountered in the wild
note that there are still calls to Collections.sort present, where the comparator function is given in the call itself. Ideally, Utils.sort should gain a way to receive a Comparator as well, but that's a bit over my paygrade, java-skills-wise.

Unfortunately, this seems to cause a test failure:  TestRectangle.testQuickSortRectangleList:100. (My pay-grade with Java, so to speak, is pretty low, so I'm not really sure what the source of the problem is, but I think Utils.sort isn't respecting the compareTo function in the Rectangle class and is erroneously sorting the characters by their X position.)


Action that requires user input

May I know if there is a way to request for user input in action?
A simple example would be to create a file using gedit.
gedit filename where filename is provided by user before executed?

Hey there! There is no built-in way, but an action that uses Zenity would be fairly easy to write - so here is your example...
        {
            "type": "command",
            "label": "Create a file using Gedit",
            "command_line": "name=$(zenity --entry --width 300 --title \"Create file\" --text \"File name\") && gedit \"$name\"",
            "cwd": "%d",
            "use_shell": true,
            "max_items": 1,
            "permissions": "read-write",
            "filetypes": [
                "directory"
            ]
        }

It works! Thanks for the advice. I noticed there is a slight error, I just changed "%d" to "%f"

On furthur analysis, is quite puzzling why "%f" works instead of "%d". I m using the GUI under "Current working directory" option.
If I use %d, when I m in /home/user/ directory, the folder directory will be in /home, 1 level up. It tried in other directory, it is always 1 level up. There is no such problem in vscode... Probably it is the problem of gedit ?

Hey there... No actually that's correct. %d is the 'directory' of the
selected item. If the selected item is your home directory the %d will be
the directory it is in ... /home. %f is the full path to the selected item.
So if you want to run a command in a selected directory then current
directory should be %f.
In other words my example is wrong 😁 ... sorry about that.
On Fri, Jan 12, 2024, 05:08 linqingfan @.***> wrote:

On furthur analysis, is quite puzzling why "%f" works instead of "%d". I m
using the GUI under "Current working directory" option.
If I use %d, when I m in /home/user/ directory, the folder directory will
be in /home, 1 level up. It tried in other directory, it is always 1 level
up. There is no such problem in vscode... Probably it is the problem of
gedit ?
—
Reply to this email directly, view it on GitHub
https://github.com/bassmanitram/actions-for-nautilus/issues/56#issuecomment-1888402717,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADAKLWUDEN53SOK2RVOZCWDYOCZMNAVCNFSM6AAAAABBWDD7CKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBYGQYDENZRG4
.
You are receiving this because you were assigned.Message ID:
@.***>

Thks


[Question] Acceptable types of badges

I know there's some repositories have something to do with music or video. I have some implementations of badges for a video website (https://www.bilibili.com) and a music site (https://music.163.com/). I wonder if you accept such kinds of badges. If so, I'll send pull request soon.

It's an interesting idea!
Where would a badge like this be used?

Like, someone made a music generator, and he used the generator to generate a music, and uploaded it to music.163.cim, or made an introduction video on bilibili.

Or some video tutorials

And the badges will show the number of viewers or listeners, or other properties of the video/music.

Some interesting ideas around here! Rather then just tracking a unique song, would it be possible to track all the songs created with the generator, for instance using some sort of tag set by the author? Also, platforms such as SoundCloud have many more users and are available in a lot of languages, maybe it could benefit more Shields users?

Supported:

Video website bilibili

video availability
danmaku count
share count
coin count
fav count

Music site netease music

Name of single song (DEPRECATED)
Name of specific album (UNDER ASSESSMENT)
Name of specific playlist (UNDER ASSESSMENT)
Comment count of single song
Comment count of specific album
Comment count of specific playlist
Play count of specific playlist
Share count of specific playlist
Subscribed count of specific playlist

And actually, I don't know much about SoundCloud...

SoundCloud has an official API. Here's the documentation
https://developers.soundcloud.com/docs/api/guide

So what's your answer

I wonder if you accept such kinds of badges.

If so, I'll close issue and soon send a pr

I'm on the fence. This seems like a good service to musicians, video producers, and content creators. While that can overlap with developers, it's on the fringe, and I'm not sure it makes sense to shift our focus of Shields-as-a-service from the developer community.
That said, I'm open to making the Shields codebase more modular, so that it's easy to build a shields-like service that serves a different audience while staying up to date with the main codebase. That's going to take some time, but it's underway… #1163 #948.
Forking Shields remains an option. It's easy to run on Heroku, for example, and while I know there's no Heroku in China, there must be good alternatives.
I'm also open to being convinced if there are a lot of developers that want this.
So I guess this is my answer to your question – which is a good question! Let's keep Shields.io focused on developers. Services should fall into one of these categories:

Services which are primarily used by developers, like any artifact repository or CI company
Services which are not primarily used by developers, but are widely used by developers, like Twitter

OK. Closed.


M3-5182: RQ-ify Images endpoints, Pt. 1

Description 📝
The first of two or three PRs related to transitioning Images out of Redux and into React Query.
In terms of functionality, this PR focuses on the Images landing page and the "Capture Image" tab when you go to create an image, and having them rely on RQ instead of Redux.
The next piece in this effort will be the "Upload Image" tab and associated functionality/infrastructure.
How to test 🧪
Ensure functionality parity of Images landing & the "Capture Image" tab between this branch and prod.
Confirm that the RQ cache is storing and updating the Images data as you would expect.
To-Do:

[x] Fix bug where Image label and descriptions aren't being updated; ensure RQ cache is updated accordingly
[x] Fix bug where redirection from "Rebuild an Existing Linode" flow doesn't open the modal on Linode Details page
[x] Convert ImagesDrawer.tsx to a function component
[x] Fix status bug on landing page after a newly-created Image is ready
[x] Cleanup

Still working through a couple of unfortunate bugs with the ImagesDrawer.tsx refactor so I will leave the WIP label on for a tad longer until those are sorted out

Great start!
I think as we continue RQ for Images we should consider refactoring the landing page to use some of our new table patterns such as not using the EntityTable component and start using API sorting (see Volumes for an example). The landing page can also be broken up into 2 useImagesQuery with filters such as 'X-Filter: { "is_public": false, "type": "manual" }'. I think the comment in line 208 of ImagesLanding.tsx refers to this. I'm sure a lot of my comments were already on your radar.

Thanks! I agree with most of this and will make a note to circle back for these changes before the RQ work for Images is wrapped up.

Going to go ahead and remove the WIP label now.
One minor bug that I'm aware of is when you rename an image and then immediately enter the "Deploy to New Linode" flow, the preselected image will have the image's prior label. This is because that Create flow is reliant on Redux still for Images data (i.e., right now, the data is getting updated in the RQ store but not in the Redux store). I've made a note to circle back to that at the end of this process and make sure the bug is fixed at that time.

Updating an image's description field from some string to a blank field does not seem to update the description field to an empty string in RQ as it does in Redux. Therefore, when the user opens the same image's Edit Image drawer again, the old description, which should have been deleted, was repopulated. On prod, clearing the description field and then reopening the drawer does result in a blank description.

This was due to me using the nullish coalescing operator 🥲 Just reverted that.

When I was messing around with sorting the tables, whenever I hit the combination of filters like http://localhost:3000/images?order=asc&orderBy=status or http://localhost:3000/images?order=desc&orderBy=status, the data in the tables sorts fine. However, when I refreshed the page or tried to navigate directly to that URL containing the query, I received the error state on the page with following error in the browser console

    {
        "reason": "Could not apply filter",
        "field": "X-Filter"
    }

In prod, filtered images tables do seem to load without errors after a page refresh and when navigating to that URL directly (e.g. https://cloud.linode.com/images?order=asc&orderBy=status).

Hmm, I can't replicate that behavior:
https://user-images.githubusercontent.com/114682940/208191769-fecbbaf6-5666-43d3-a61f-35cf6cb5ce55.mov

Joe and I were able to replicate the sorting issue this morning that Mariah mentioned. I'm going to investigate it more. If there's a fix to be made on our side I'll make those adjustments in the Pt. 2 PR; if it proves to be an API issue, I'll open a ticket with them regarding it.
Going to merge this now to keep things moving along but the Pt. 2 PR will incorporate some of the other feedback here as well.


Is "Bounded Polymorphism" supported via "Flow Comments"

Hi,
the documentation doesn't make it clear whether flow comments (0.4.0) provides support for bounded polymorphism (0.5.0).
If it does, is it possible to provide update to both post ?
best regards.

Yes, all Flow annotation syntax-extensions, including bounded polymorphism, should work with the flow comments feature. This will also be true for any annotation syntax that may get added in the future as well.


Reading data

Merge request template: please remove the appropriate parts of this template.
Pre-merge request checklist (to be completed by the one making the request):

[ ] I have performed a full review of this code myself.

For Python code in PySpark specific sections, all code should have been run in Jupyter notebooks.
For code in sections of the book containing both Python and R code, the page of the book should be constructed as described in the contributing guide and converted to a markdown file.

[ ] I have formatted the outputs of code blocks correctly (to match other outputs in the book and in line with the style guide [coming soon])
[ ] I have built the book as outlined in the contributing guide and confirmed that any additional/modified content is displaying as expected.

Details of this request (such as):

details of bug fix
implementation of new feature X
solution to issue #Y

by doing Z

Things to note about this request (such as):

details of request that will be important to the reviewer
smaller features that might not yet be implemented in this wider feature that need to be added to the repo as an issue

Requirements for review (such as):

run certain files, perform build of book etc
any decisions that need to be made by reviewer

@robertswh having trouble getting the notebook converter to work so have just created this as a draft PR for now (since I haven't been able to convert the notebooks/build the book) but would be good to get your feedback on the content and I'll add in the markdown and check the book once I can get the converter to work.


[SM-8476] Multi-Company Credential Support

Current dependencies on/for this PR:

main

PR #51   👈

This comment was auto-generated by Graphite.


Configure passenger through hiera.

I've tried to configure the pre-built passenger packages through hiera but I seem to be missing something.
The following puppet config works for me as expected:
  class { 'nginx':
    package_source  => 'passenger',
  }

I tried to transform this into the puppet part:
include nginx

and the hiera part:
---
nginx::package:
  package_source: 'passenger'

However the puppet-nginx module doesn't respect the hiera config. Am I using the wrong keys in hiera?
EDIT: I have modified my initial comment. Initially I was wondering about nginx::config::http_cfg_append as well, but this works fine. So my final question is only concerned about the package_source.

Use this in hiera:
---
nginx:
  package_source: 'passenger'

The reason is a resource-like declaration is being used to declare nginx::package in init.pp. That overrides whatever you set in hiera for nginx::package. Instead, set package_source on nginx class as in my example.

There's info here about the automatic parameter lookup rules: https://docs.puppetlabs.com/hiera/1/puppet.html#automatic-parameter-lookup

@3flex thanks for your answer. Unfortunately your suggestion didn't work for me either. However following the documentation I managed to figure out the correct hiera config:
---
nginx::package_source: 'passenger'

That works for me with puppet 3.7.4 and hiera 1.3.4 and jfryman-nginx v0.2.6.


Default Mount Bindings - Setting does not apply

Operating System
Ubuntu 22.04 LTS
AMP Version and Build Date
<IP_ADDRESS> - 20241030.1
AMP Release Stream
Mainline
I confirm that

[X] I have searched for an existing bug report for this issue.
[X] I am using the latest available version of AMP.
[X] my operating system is up-to-date.

Intended Action
Apply default mount bindings for instances running in docker, rather than having to edit CustomMountBindings in instances.json directly.
Expected Behaviour
Mount bind paths provided should be used to add custom volume binds on newly created instances running in docker.
Actual Behaviour
Bindings input aren't being applied. The CustomMountBinds entry for the instance in instances.json isn't updated, and running docker inspect against the container created by AMP does not list these extra volumes.
Reproduction
This has been the case since the feature was added to the web interface, was initially a frequent support topic but died down over time and doesn't appear it was formalised as a GHI at the time.
In my case, I have provided a simple 1:1 host path to container path mapping. Currently mapping Host Path "/home/amp/storage/AMPBackups/{{InstanceName}}" to Container Path "/home/amp/storage/AMPBackups/{{InstanceName}}" under Default Mount Bindings.

When I create a new instance, ensuring Create in Docker Containers is enabled, this should then create the new instances and apply this docker volume bind. Presumably this is intended to modify the existing CustomMountBinds setting in instances.json.
However this does not occur. CustomMountBinds for the new instance remains a blank value, with no custom volume binds applied to the newly created instance if the docker container is inspected.
Manually editing CustomMountBinds in instances.json to provide this same binding still works as intended.
I've attempted a few different paths, to ensure it wasn't an issue with template substitution when attempting to save the value, but simple paths or paths outside of the /home/amp directory (to ensure it wasn't user related weirdness) had the same result.

Can confirm, this does not seem to work whatsoever. Added an entry to default mount bindings and newly created instances do not copy this setting.
Really unfortunate that this isn't getting any attention.
Version <IP_ADDRESS>.

There's been priority issues that don't have workarounds taking our focus. For now, you can follow the guide here to add mount binds the original way.
Edit the following for the specified instance in the instances.json file within the datastore:
Key - CustomMountBinds
Value - {"/media/backups":"/media/backups"} - Typically, these will be the same value on both sides, but for more info: The left side is the path on the host, the right side is the path in the container.


Node customization

For my application purpose it is required that the node values are displayed (tilted) inside the nodes.
Ideally, I would like to be able to customize the diagram more or less as in the tool below, but with python.
http://sankey.csaladen.es/
Screenshot from tool;

I don't see the possibility to do this as of yet, could this be possible in the future?

Hi,
Sorry for taking so long to reply. This might be possible in future, but it would be done as part of d3-sankey-diagram which ipysankeywidget wraps. I'll move this issue to there.

Hello,
Are there any updates on this work stream? If so, where can I find an example of the implementation?
Thanks!

Hi,
I've just added this to d3-sankey-diagram (example) but it hasn't yet been exposed in ipysankeywidget.
Contributions are welcome if you (or anyone else) would like to have a go at this! It would need a node_width trait to set the node width, and perhaps a value_format option too, with the widget Javascript code updated following the example above.


Is whitelisting of s0.2mdn.net still the case?

s0.2mdn.net seem pretty prevalent and blocking it I haven't found single site to break.
I would tried mtv.ca and cbs.com to recheck that whitelisting s0.2mdn.net is still needed, but those are geo-fenced and doesn't play in my region unfortunately.
Would you reconsider to remove s0.2mdn.net from whitelist https://github.com/FadeMind/hosts.extras/blob/master/whitelist ?
Thank you and cheers

@StevenBlack @crssi
Hi
Still whitelisting in oisd.
https://oisd.nl/excludes.php?w=2mdn.net

Sure it is, and the first reason ir your list 😉
See https://oisd.nl/excludes.php?w=s0.2mdn.net

Chasing the tail. 😉
Any verdict?
Thank you and cheers

@crssi whiltelist file only suggest. I will not delete from file 2mdn.net until will be not removed mainstream from other whitelist.
Cheers

I guess that with from other whitelist you do not mean OISD?
Because OISD has listed it from your list. 😄
Cheers

https://raw.githubusercontent.com/notracking/hosts-blocklists-scripts/master/hostnames.whitelist.txt
# https://github.com/StevenBlack/hosts/issues/419
 s0.2mdn.net
 2mdn.net

And there we go all around: https://github.com/StevenBlack/hosts/issues/1560

Just wait for feedback UPSTREAM.  Closing.


Make use of sentry and datadog

Allow to track amount of errors (sentry): https://github.com/Sija/raven.cr
statistics (datadog): https://github.com/miketheman/statsd.cr

Currently tending towards using rollbar if at all: https://github.com/adamcreekroad/rollbar-crystal

Has been implemented


#5435 add rmrk label

Thank you for your contribution to the KodaDot NFT gallery.
👇 _ Let's make a quick check before the contribution.
PR Type

[x] Bugfix
[ ] Feature
[ ] Refactoring

Context

[x] Closes #5435
[ ] Requires deployment <>

Before submitting pull request, please make sure:

[x] My contribution builds clean without any errors or warnings
[x] I've merged recent default branch -- main and I've no conflicts
[x] I've tried to respect high code quality standards
[x] I've didn't break any original functionality
[x] I've posted a screenshot of demonstrated change in this PR

Optional

[ ] I've tested it at </bsx/collection>
[ ] I've tested PR on mobile
[ ] I've written unit tests 🧪
[ ] I've found edge cases

Had issue bounty label?

[x] Fill up your KSM address:
Payout

Community participation

[x] Are you at KodaDot Discord?

Screenshot 📸

[x] My fix has changed something on UI; a screenshot is best to understand changes for others.

I checked value for props.item.chain , it was rmrk

please fix ts error, you can check or reproduce it by running pnpm prepare

done

@prachi00 let's check this one 💪

let's see if it builds properly 👀

@vikiival 👀

@vikiival 👀

4da142b

pay 10 usd

😍 Perfect, I’ve sent the payout
💵 $10 @ 33.1 USD/KSM ~ 0.302 $KSM
🧗 EzGc4s9PgCPx1YnF3fqzhLzVHpHMTL4LWPScwpDrR8JKgSU
🔗 0xb63002e270bb74fdd547cce38d11020e742896b5407afe4edd232bbf597f750c
🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues

oh @prachi00 seems doesn't work


flake: add overlay as an alternative to legacyPackages

This adds an overlay containing both makeNixvim functions. This simplifies usage of the functions, as well as enabling you to use your own preinstantiated package set, instead of the one from this flake.

I'm not too sold out on the overlay, you can easily access those functions through module._args if you use NixOS modules, or through extraSpecialArgs for Home-Manager.
For the case of using a predefined nixpkgs there is the option with makeNixvimWithModule to pass a pkgs argument.
I find it a bit weird to add non package (even non derivation) attributes to an overlay.

I would like to use nixvim standalone, without needing to enable the nixos or home-manager modules. This enables me to have multiple vim configurations completely independent of each other.

I would like to refrain form using either the nixos or home manager modules just to get the functions, as I don't intend to use the options.
With the current legacyPackages approach, this requires me to be able to refer to my flake's inputs at the point where I want to call makeNixvimWithModule, and also requires me to know the current system. So this would be come this rather unwieldy expression:
# home-manager.extraSpecialArgs.flakeInputs = flakeInputs;
{ flakeInputs, pkgs, ... }: {
  home.shellAliases.secondaryVim = lib.getExe (flakeInputs.nixvim.legacyPackages.${pkgs.stdenv.hostPlatform.system}.makeNixvimWithModule {
    inherit pkgs;
    module.config = {
      # <nixvim config>
      # globals.mapleader = ",";
    };
  });
}

By exposing the function as an overlay you would implicitly add the correct system context without any extra effort, and this becomes much more readable:
{ pkgs, ... }: {
  home.shellAliases.secondaryVim = lib.getExe (pkgs.nixvim.makeNixvim {
    # <nixvim config>
    # globals.mapleader = ",";
  });
}


Servo Angle Visibility

Make it possible to enter exact angles for Servos maybe?


Automated Splunk TA Update 100

This PR contains updates to Splunk TAs made by GitHub Actions workflow.

Closed in favor of duplicate PR https://github.com/splunk/security_content/pull/3220


Instrument GA tracking to capture clicks made on downloads and extern…

…al links
A lot of GA tracking comes 'out of the box' but a notable exception is tracking to capture clicks on downloads and external links. Additional code is required in order to capture these.
Currently, we are tracking some downloads and external links on the DM site (those that were specifically required for previous mission work).
The proposal is to have all downloads and external links tracked automatically across the whole site, similar to how GOV.UK have done.
The advantage of doing this is that we have key data available straight away at the start of mission teams rather than having to prioritise the work, use up dev resource and then wait for enough data to populate before being able to carry out analysis.
---> includes making sure all links on the homepage are tracked, so we can measure which links are used the most and least.
Ticket: https://trello.com/c/i912cDBe/110-instrument-ga-tracking-to-capture-clicks-made-on-downloads-and-external-links

@katstevens - I spoke to ash and right now we'll just focus on external links. As assets is still within the digital marketplace, we can leave it as is.
Regarding the manual - I will put in a section into the manual for tracking external links.

Hey @katstevens  - put in a small paragraph for general tracking and external links
https://github.com/alphagov/digitalmarketplace-manual/blob/external-links/google-analytics.rst#general-tracking


Keep circles when time pass

Hi everyone,
I'm trying to build a map with TimeDimension that has sets of Circles that changes styles and dimension on the time change.
The problem is that I'm stuck, the circles that I added with
  let circle1 = L.circle([41.89, 12.49], { radius: 11000 });
  let circle2 = L.circle([43, 11], { radius: 22000 });
  ...

  const dataLayer = L.timeDimension.layer([circle1, circle2, ...]);
  dataLayer.addTo(map);

are present only in the first frame, whenever the time changes the circles disappear, I've understood that this is because whenever the time change this plugin creates another layer, but I didn't understand how to keep my circles.
How can I achieve this?
Also, how can I modify a set of Leaflet Vectors on time change? I've tried to do it by deleting the vectors and then re-adding them, but it was pretty slow with one circle, so I think that this isn't the best option.

I've managed to do that with
  map.timeDimension.on('timeloading', (data) =>
    //  Do your stuff here

    //  For example if you wanna access the index of the time that's the path
    console.log(data.target._currentTimeIndex),
  );

Hi @fabriziopaolopetrelli,
the idea is to extend L.Timedimension.Layer class to include there the interaction between your layer and TimeDimension.
As stated in the documentation, any children class should implement _onNewTimeLoading, isReady and _update functions to react to time changes.
I have prepared a very basic example with a CircleTimeDimensionLayer. Instead of getting the radius information from an external API, it simply gets a random radius (but with a setTimeout to simulate an API call). You can check it out here: https://codepen.io/bielfrontera/pen/XWemjaK


check that references use canonical base64

for base64 strings that represent a byte string not a multiple of 3 bytes long, check that overhanging chars correctly encode zeros at the overhang. uses http://npm.im/canonical-base64

@christianbundy thanks,
merged into 2.12.1

@christianbundy thanks,
merged into 2.12.1

@christianbundy thanks,
merged into 2.12.1

oops, this actually breaks scuttlebot tests...

I merged this, then I realized I broke everything... because it use '#' for the msg sigil and not '%' and there was no test coverage for that! (but linked it into scuttlebot broke quickly, though the problem wasn't obvious)
fixed that, and it's now published as 12.2.2


License

I want to use the project inside my project, but I could not see the licence. Please can you add a licence. MIT licence preferred :) Thanks

Done https://github.com/trembacz/xpath-finder/commit/34848b970f18374dfb876bf3541b4e604604deca ;)

@trembacz thank you so much:)


Migrate CI to GitHub Actions [SDK-4710]

[ ] All new/changed/fixed functionality is covered by tests (or N/A)

📋 Changes
This PR adds a GitHub actions workflow to run the build and test jobs. The CircleCI config will be removed in a future PR.

Please ignore the CircleCI failure, its config will be removed in a future PR.


please add swift 4 support!! thanks!

When the release is planned? Thanks

Please plan a release for Swift 4

#135


Radius of trader search is only restricted in the UI

Describe the bug
The radius of the trader search is only restricted in the UI. One can easily change the URL parameter to query the whole database. The slider even shows the too large values.
To Reproduce
Steps to reproduce the behavior:

Start a valid search for any city.
Change the last number in the URL, i.e. after the last '/', to something ridiculously large, e.g. 999999
Wait for the page to load all entries
See error

Expected behavior
The radius should always be restricted to some reasonable distance.
Might be fixed with the map view?
Screenshots

Device and OS:

Computer with Manjaro Linux
Chrome 81

URL query validation in place and works.


Add support for patient email

Add support for patient email to telecom
If PID.13 (home) or PID.14 (work) has a value in XTN.4 create a ContactPoint element.
Example:
{
        "system": "email",
        "value"<EMAIL_ADDRESS>        "use": "home",
        "rank": 1
      }

use will be "home" for PID.13, "work" for PID.14
rank will be included if there is a value in XTN.18

At this time, no need to check if XTN.2 has NET or XTN.3 has Internet or X.400.  Although these would be expected. If there is any value in email, we will capture it.  In the future if validation of email format is required, it can be added.

In Release 1.0.9


Add Validator setter in EndpointRegistrar

:loudspeaker: Type of change

[ ] Bugfix
[ ] New feature
[x] Enhancement
[ ] Refactoring

:scroll: Description
Add Validator setter to EndpointRegistrar that is propagated to the HandlerMethodArgumentResolver instances configured in AbstractListenerAnnotationBeanPostProcessor.
:bulb: Motivation and Context
Discussed in https://github.com/awspring/spring-cloud-aws/discussions/854.
Currently, there is no easy way to set up validation for payload in the listener methods. The PayloadMethodArgumentResolver and BatchPayloadMethodArgumentResolver have set null for the validator field which means they never will validate the payload. This change will propagate the Validator set in EndpointRegistrar.
:green_heart: How did you test it?

Unit test
Manual test

:pencil: Checklist

[x] I reviewed submitted code
[ x I added tests to verify changes
[x] I updated reference documentation to reflect the change
[x] All tests passing
[x] No breaking changes

:crystal_ball: Next steps

The PR is submitted from the wrong fork. Sorry for the spam.


Allow custom vite env prefix

Clear and concise description of the problem
As a developer using Vite I want to be able to set a custom prefix for VITE env variables.
Suggested solution
It seems that loadEnv already accepts a prefix argument. If the prefix can be passed via a vite config/option, this would be ideal.
Alternative
No response
Additional context
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Could you give an explain about the why?

I like the idea.

VITE_ doesn't really tell you what that prefix does, some may prefer using something like EXPOSED_ or PUBLIC_
Frameworks using vite might want to use their own syntax
You could expose different subsets of envs to different builds

@dominikg presents a couple of reasons why. My personal reason is actually the 2nd one as well - I am writing a framework/tool and would want to use custom syntax so as not to expose vite as the underlying build system (for general portability)

We discussed in the team that we are fine with this
Should be a new option and we need to prevent that the new prefix could be an empty string, cause this could be used to break out of security and in worst case overwrite some envs like BASE_URL and stuff

Does anyone work on this issue? I'm willing to give it a shot in weekends.

Does anyone work on this issue? I'm willing to give it a shot in weekends.

Currently there is no associated PR and I don't know a branch for that.
So yeah, pls feel free :rocket:
I'm happy to review it when you are finished :slightly_smiling_face:


Merge pull request #1 from ITensor/master

Update to newest version of ITensors

sorry, wrong way round...


Aggregated Table A-1 Changes

See link to updated Table A-1 below. The 9/15/21 link is now obsolete.
The Table A-1 version from 09/15/2021 is expected to address the following individual items
#859
#970
#971
#972
#1065
Sept 15, 2021 Table A-1 is now obsolete.  See May 13, 2022 for revised content.
https://github.com/Equipment-and-Tool-Institute/j1939-84/files/7171010/J1939-84-Table-A-1-MY24.15Sept2021.docx

Also
https://github.com/Equipment-and-Tool-Institute/j1939-84/issues/820, https://github.com/Equipment-and-Tool-Institute/j1939-84/issues/818, https://github.com/Equipment-and-Tool-Institute/j1939-84/issues/982, https://github.com/Equipment-and-Tool-Institute/j1939-84/issues/970, https://github.com/Equipment-and-Tool-Institute/j1939-84/issues/971, https://github.com/Equipment-and-Tool-Institute/j1939-84/issues/859, https://github.com/Equipment-and-Tool-Institute/j1939-84/issues/515

Changes were not observed in 3.1.0

Duplicate Rows Removed. Def This Cycle Added.
J1939-84-Table-A-1-MY24-13May2022.docx

Column 4 yes to warm change
J1939-84-Table-A-1-MY24-Aug-30-2022-v1.docx

@ericthomasswenson in the latest task5v3 documentthe SPN 84 data did not carryover the INFOs in place of the WARNs:


Fixing credential lookup for fe proxy and vault

ci check this

This PR will pass if rebased on top of https://github.com/kubernetes-incubator/kubespray/pull/2359 but let's not waste too much time. There's a big backlog of PRs.


Improve SEO and fixed few broken links

Blocked by https://github.com/runtimeverification/k-web-theme/pull/9
@ehildenb
This pull request improved the SEO by adding the canonical links. It also fixed several broken links and the sitemap.xml.
The k-web-theme is also updated to the latest.

@shd101wyy FYI this is blocked from being merged because it also updates the k-web-theme. You either need to:

Let the auto-updater take care of updating submodules, not other PRs, or
Make sure to close the open auto-updater PR and delete the branch whenever you update the submodule manually yourself.

@ehildenb I see. Thank you!


Provide openAPI spec for REST endpoints

Would be nice to have something providing an API description either on the build stage or in runtime. For example, it could be a swagger plugin that adds an additional endpoint, like /swagger.json.

thx for this issue. We agree and will provide open api specs with our first release.

Done by #522


Grabbing channels' live chats and disconnection

Is your feature request related to a problem? Please describe.
When my internet kinda disconnects a bit, the usual script would have retries to continue the script until it has connection, right?
It kinda sucks to wake up to the channel grabbing script to show this.
[INFO] There are no active or upcoming livestreams with a live chat. Retrying in 30 seconds.
[ERROR] Unable to establish a connection. Please check your internet connection. ('Connection aborted.', TimeoutError(10060, 'A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond', None, 10060, None))
[DEBUG] Session closed.

Also, this usually only shows on one channel, so that's random lmao
Describe the solution you'd like
Make a maximum total of retries I guess. Or just make the script indefinite. Not stopping until it finds a connection, I think that'd be great. Thanks and take it easy, this isn't a big problem for me, just kinda irks me a bit.

Sure, I can add that! 👍

The output should be something like:
[INFO] There are no active or upcoming livestreams with a live chat. Retrying in 30 seconds.
[WARNING] Retry #1 (sleep for 0s or press Enter). ('Connection aborted.', TimeoutError(10060, 'A connection attempt failed because the connected party did not properly respond after a period of time, or established connection
failed because connected host has failed to respond', None, 10060, None)) (ConnectionError)
[DEBUG] Starting new HTTPS connection (2): www.youtube.com:443
[WARNING] Retry #2 (sleep for 1s or press Enter). HTTPSConnectionPool(host='www.youtube.com', port=443): Max retries exceeded with url: /channel/UCyl1z3jo3XHR1riLFKG5UAg/videos?view=2&live_view=501 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000023FDCAF3F70>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')) (ConnectionError)
[DEBUG] Starting new HTTPS connection (3): www.youtube.com:443
[WARNING] Retry #3 (sleep for 2s or press Enter). HTTPSConnectionPool(host='www.youtube.com', port=443): Max retries exceeded with url: /channel/UCyl1z3jo3XHR1riLFKG5UAg/videos?view=2&live_view=501 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000023FDCAF3FA0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')) (ConnectionError)
[DEBUG] Starting new HTTPS connection (4): www.youtube.com:443
[WARNING] Retry #4 (sleep for 4s or press Enter). HTTPSConnectionPool(host='www.youtube.com', port=443): Max retries exceeded with url: /channel/UCyl1z3jo3XHR1riLFKG5UAg/videos?view=2&live_view=501 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000023FDCAF3F70>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')) (ConnectionError)
[DEBUG] Starting new HTTPS connection (5): www.youtube.com:443
[WARNING] Retry #5 (sleep for 8s or press Enter). HTTPSConnectionPool(host='www.youtube.com', port=443): Max retries exceeded with url: /channel/UCyl1z3jo3XHR1riLFKG5UAg/videos?view=2&live_view=501 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000023FDCAF3FA0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')) (ConnectionError)

Alright, I probably used 1.0.3 for the channel live chats. If I use the usual directory for saving regular streams, it's just 1.0.2 with a little error from time to time, so I didn't bother them. But for the channel live chats, I should've updated it I guess, it's now 1.0.5, I'll try it now, thanks!

Actually, I think I added this functionality a few days ago, but haven't released it yet 😅
I will publish a new release soon 👍

Okay, version 0.1.6 should have those changes 👍
Let me know if you still have any other questions.

Okay, for clarification, I'm still using 1.0.5 currently and I just realized that it'll stop if there's no upcoming streams at all. If there's a stream room available, the script will regularly retry until the internet is up. If there isn't any room, the script will just stop, I'll try the 1.0.6 tomorrow, thanks.


opt: split composite from array flattening

DXC has an option to flatten resource arrays. But when this option is not used, the resource arrays should be kept as-is. On the other hand, when a struct contains resources, we MUST flatten is to be compliant with the Vulkan spec.
Because this pass flattens both types of resources, using a struct of resources automatically implied flattening arrays. By adding those 2 new settings, we decide if the pass flattens only one type of resources, or both.
Note: the flatten_arrays flag only impacts resource arrays. Arrays of composites containing resources are still flattened.
Since the API is considered stable, I added 2 new functions to create passes with one flag or the other, and kept the original behavior as-is.
Related to https://github.com/microsoft/DirectXShaderCompiler/issues/6745

Done, surely more convenient with a command-line flag. PTAL 😊


By default, why is downhillcost=60 and uphillcost=0?

Maybe this is just a confusion of terms, but why is there a cost in going downhill but none in going uphill by default in brouter-web?

This has been answered here.


fix: warnings

Got most of them but the following remain. If an easy fix feel free to take over this PR, otherwise I'll look into it later.
➤ YN0000: ┌ Resolution step
➤ YN0002: │ @codechecks/client@npm:0.1.12 doesn't provide typescript (pb3185), requested by ts-node
➤ YN0060: │ @ubiquity/dollar@workspace:packages/contracts/dollar provides @nomiclabs/hardhat-ethers (pe1017) with version 0.3.0-beta.13, which doesn't satisfy what @nomiclabs/hardhat-waffle requests
➤ YN0060: │ @ubiquity/ubiquistick@workspace:packages/contracts/ubiquistick provides @nomiclabs/hardhat-ethers (p86605) with version 0.3.0-beta.13, which doesn't satisfy what @nomiclabs/hardhat-waffle requests
➤ YN0002: │ typechain@npm:3.0.0 doesn't provide typescript (p4ba7f), requested by ts-essentials
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 421ms
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed in 0s 400ms
➤ YN0000: Done with warnings in 1s 163ms

Got most of them but the following remain. If an easy fix feel free to take over this PR, otherwise I'll look into it later.
➤ YN0000: ┌ Resolution step
➤ YN0002: │ @codechecks/client@npm:0.1.12 doesn't provide typescript (pb3185), requested by ts-node
➤ YN0060: │ @ubiquity/dollar@workspace:packages/contracts/dollar provides @nomiclabs/hardhat-ethers (pe1017) with version 0.3.0-beta.13, which doesn't satisfy what @nomiclabs/hardhat-waffle requests
➤ YN0060: │ @ubiquity/ubiquistick@workspace:packages/contracts/ubiquistick provides @nomiclabs/hardhat-ethers (p86605) with version 0.3.0-beta.13, which doesn't satisfy what @nomiclabs/hardhat-waffle requests
➤ YN0002: │ typechain@npm:3.0.0 doesn't provide typescript (p4ba7f), requested by ts-essentials
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 421ms
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed in 0s 400ms
➤ YN0000: Done with warnings in 1s 163ms

it looks this happens because codechecks/client is not typescript package.  what I am thinking of a way to fix warnings is to find another dependency which is written in ts. but warning will not break the product running.

but warning will not break the product running.

Consider this as part of my ongoing effort to reduce technical debts everywhere possible.
I ebb and flow between being able to directly work on the code and everything else in the organization. Unfortunately it usually comes down to me personally to reduce technical debt. This would be probably my fifth go at it since starting the project lol

Releasing this work into the devpool. Somebody else can take this over and merge!

we'll continue in coming year


Notation for creating sample data

One annoyance in SQL is that it's quite difficult to create some data in code. This is generally used for sample tables when demonstrating something, or for quick lookup tables.
IME it ends up being something like:
select tim as first_name, smith as last_name, 30 as age
union all
select mary, jones, 31
union all
...

I think we could make this much nicer. The simplest approach would be to just do from_json (or _csv or _yaml), parse the inline string, and then convert to the verbose SQL representation. As above, it's not for loading lots of data; it's just for small samples.
There's possibly a better approach which could include types / structs / arrays etc, though we're somewhat limited by the constraints of SQL. The thought was inspired by @jamii's post's, worth reading (& subscribing!): https://www.scattered-thoughts.net/writing/the-shape-of-data/

I would rather propose we use from for this:
from data:[
  first_name: "tim",
  hobby: "HI",
  age: 30,
]
join ...

From can then be thought as "data source" either as a table, inline data or csv/json/yml
Also there has to be quotes on strings.

Great, agree with the from (/ table?) syntax.
With the more literal style, how would be represent multiple rows succinctly? It would be convenient to have a format that people can copy from somewhere else too, as opposed to a PRQL-specific format.
I had started making something like:
from csv:r#"
first_name, last_name, age
tim, smith, 30
mary, jones 31
"#

I had started with CSV since it doesn't need quotes (it wouldn't need the r#""# at first), and is more concise than JSON.
WDYT? Do you still prefer the more "PRQL-native" approach?

Hmmm, why not both? PRQL has nice highlighting, CSV is copy-pastable. There are use cases for both.
Problem with CSV is that there is no standard. comma/semicolon/tab/space, header/no header, spaces after comma are all ambiguous in different software.
Before adding r#""# think twice about how will be include regex literals. Also, in your example string literal starts with new line...

Before adding r#""# think twice about how will be include regex literals. Also, in your example string literal starts with new line...

I was thinking that r"\w" would be raw text, and the rust approach of r#"foo"# was a good way of extending this to multiple lines! WDYT?

Hmmm, why not both? PRQL has nice highlighting, CSV is copy-pastable. There are use cases for both.

Definitely agree. I do think there can be a temptation to build too many ways of doing something — it's difficult to turn ideas down! But for new users it can be confusing. Generally I would vote to do one thing and then assess if we need another.
Possibly in this case there is a real use for both though.

I do appreciate you keep things clean @max-sixty , I agree with your sentiment of only building one way to do things in the beginning.  More ways will come as the language grows but in the beginning if we can keep it light I think it will go far.
That said , I still like the prql approach of from data , but it looks like it would only allow for one row.  How many rows do you need in this approach ?

How many rows do you need in this approach ?

Generally for sample data I've needed 5-10...

Something I've noticed that I miss from SQL as I'm writing documentation is the ability to start without a table; e.g. if we want to demonstrate an s-string, we need to have something like:
from employees
derive db_version: s"version()"

...whereas in SQL, that's just SELECT version(); no need for the from.
Hopefully as part of this we can make that easier; e.g.
from data:""
derive db_version: s"version()"

...might be sufficient

but now, CSV looks better because it has headers at the top.

CSV is not a great format, but it does have this one advantage! Are there nicer formats that also can have column names specified only once?

Also, currently this is a valid query:
derive db_version: s'version()'

SELECT
  version() AS db_version

Also, currently this is a valid query:

Ah, I didn't even realize that! That's great!

SQL has that:
INSERT INTO employees (first_name, age) VALUES
("John", 15),
("Janez", 17),
("Hans", 16)

Yes, this is very reasonable. it's a shame that this doesn't extend to inline sample data; and requires table modifications — particularly for analytical DBs where table modifications are expensive & rare.

Postgres has something decent for this: https://www.postgresql.org/docs/current/queries-values.html

Great. This means that we have a few notations and a way to convert that to SQL (at least for postgres).
from data:[] column:[]
from data:[column1:value, column2:value, ...  ]
from csv:"column1,column2\nvalue1,value2"

As far as I am concerned, we can go on and implement this.

Great! I am some of the way through it, I paused last week, but I can finish it off!

Then there's
from datasource("file:/C:/data/employees.csv")
...

with schema("https://example.com/data/schema.json")
from datasource("https://example.com/data/employees.json")
...

(!)

Oh, that's right. pyprql had something like this to load a file directly and we should also incorporate it into the language. Although, with should probably also be an argument to from.

Yes, agree, I think the
from `file:/C:/data/employees.csv`

could work now; it compiles to:
SELECT
  "file:/C:/data/employees".csv.*
FROM
  "file:/C:/data/employees".csv

So possibly we want just SELECT * there, but it's close.
And then the implementation will be up to the engine; duckdb will work now, obv most DBs won't

The schema is a broader question which I don't think we're ready to answer yet

For a generic solution csvq looks pretty good and perhaps could be added as an SQL dialect/back end? Command line tool, MIT license.

@max-sixty I concur your with your concern about the increase in cardinality with from_csv, from_json, from_yaml, ... . I'm also concerned about whether it won't potentially be confusing in databases like DuckDB where things like
SELECT * FROM 'test.csv';

are possible and a user might expect to have to use from_csv in the PRQL case for that?
Given that this is about reading inline data from a string, how about a name like from_inline or from_string and then making the type/kind of data a paramter? Something like the following signature
from_string kind:{csv,json,yaml,...} data

So the original example would look like:
from_string kind:csv """
  a,b,c
  1,2,3
  4,5,6
"""
filter [a > 2]

Other possible names to consider for the kind parameter would be type, format, or encoding.

The DuckDB csv file case was partially covered above with the mention of a 'file://' prefix in the table/URI name. Another option to consider would be a from_file clause/transform which then could take a similar kind parameter to specify csv, json, parquet, ...

That's a great point. I'm +2 on the from_string instead of from or from_csv.
I think that from_string format:csv "..." is the best signature.
And :+1: on from_file, but this if for #someday_maybe

I broadly agree. I do find "string" a bit engineer-y — but maybe "inline" isn't that much better. I'm +1 on from_string unless we can think of a friendlier alternative

from_text?

from_text sounds good.

RE: from_file, I agree that that's not needed now (or ever possibly). The DuckDB case works just fine with what we have at the moment because you can simply put the file path in a quoted table name and DuckDB is perfectly happy with that and just works.

This has been decided and is now matter of implementation, see #1014 for outline of how to implement.

First part (from_text function) is now done. Second part (actual relation literals) can be postponed until we formalize type system, because the syntax of relation literals will probably reflect syntax of type definitions.
By relation literals I mean this:
[[first_name: "tim", hobby: "HI", age: 30]]
select [hobby, age]

Maybe the formats should be defined in modules instead of the core?
Maybe it should be possible to augment this with new data kinds from third-party modules?
Maybe someone want to from_tsv, from_ xml, from_bson, from_jsonb, from_excel, or from_rdf?
If you have from_string format:csv "..." then where format is specified as parameter (format:{format_type}) then would that format be possible to argument with new formats defined in modules that gets imported?

@vanillajonathan This has actually been implemented and the following works in the playground:
from_text format:json '[{"a": 1 , "b":2}]'

I believe the following should work too but for some reason I keep having problems with it. Can anyone reproduce the buggy playground behaviour for the example below?
from_text format:csv 'a,b\n1,2'

I see. Maybe it should be possible to extend the formats used by from_text by importing formats from modules?
I find it rather confusing that from_text has no parenthesis, it makes me not know if its a language construct or if it is a function call. It seems from_text is defined in the std.prql file so it seems it is a function.

"Language constructs" are pretty much all functions (it's functions all the way down). Function calls don't take parentheses in PRQL and PRQL is more like functional languages like Haskell in that respect. There's some more detail here: https://prql-lang.org/book_integrated/
This could probably be documented or explained better. If you have a suggestion for something that's missing from the docs or that could be explained better, please feel free to submit a PR - this makes a great first PR!

The link just points to the book not a particular page on the book.
So I guess from, filter, and take are just functions too?

(closing as completed, feel free to continue the discussion re functions!)


Node-red/Raspberry pi zero crashes

On installing this node, node-red just crashes on startup with the message Illegal Instruction.
if i delete this node node-red starts as normal. i think zero is arm6. Is this node for armv7?
I've installed from pallette manager as well as from command line in ~/.node-red$ npm install node-red-node-xyz and the same problem

Thanks for reporting. Can you post the full stack trace?

please guide how can i do that?

`pi@zeropi:~ $ node-red
13 Apr 15:21:17 - [info]
Welcome to Node-RED
13 Apr 15:21:17 - [info] Node-RED version: v0.18.4
13 Apr 15:21:17 - [info] Node.js  version: v8.11.1
13 Apr 15:21:17 - [info] Linux 4.9.80+ arm LE
13 Apr 15:21:37 - [info] Loading palette nodes
Illegal instruction
`
pi@zeropi:~/.node-red/node_modules $ rm node-red-contrib-ttn/ -rf                                        pi@zeropi:~/.node-red/node_modules $ node-red
`13 Apr 15:27:52 - [info]
Welcome to Node-RED
13 Apr 15:27:52 - [info] Node-RED version: v0.18.4
13 Apr 15:27:52 - [info] Node.js  version: v8.11.1
13 Apr 15:27:52 - [info] Linux 4.9.80+ arm LE
13 Apr 15:27:58 - [info] Loading palette nodes
13 Apr 15:28:23 - [info] Dashboard version 2.8.2 started at /ui
13 Apr 15:28:30 - [warn] ------------------------------------------------------
13 Apr 15:28:30 - [warn] [node-red-node-sqlite/sqlite] Error: Cannot find module '/home/pi/.node-red/node_modules/sqlite3/lib/binding/node-v57-linux-arm/node_sqlite3.node' (line:4)
13 Apr 15:28:30 - [warn] ------------------------------------------------------
13 Apr 15:28:30 - [info] Settings file  : /home/pi/.node-red/settings.js
13 Apr 15:28:30 - [info] User directory : /home/pi/.node-red
13 Apr 15:28:30 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
13 Apr 15:28:30 - [info] Flows file     : /home/pi/.node-red/flows_zeropi.json
13 Apr 15:28:30 - [info] Server now running at http://<IP_ADDRESS>:1880/
13 Apr 15:28:31 - [info] Waiting for missing types to be registered:
13 Apr 15:28:31 - [info]  - sqlitedb
`

following the instructions on this page: https://github.com/BretStateham/pinodevscode i get the following output in the VS Code remote debugger for node js:
`(node:20665) [INSPECTOR_ASYNC_STACK_TRACES_NOT_AVAILABLE] Warning: Warning: Async stack traces in debugger are not available on 32bit platforms. The feature is disabled.
13 Apr 15:38:58 - [info]
Welcome to Node-RED
13 Apr 15:38:58 - [info] Node-RED version: v0.18.4
13 Apr 15:38:58 - [info] Node.js  version: v8.11.1
13 Apr 15:38:58 - [info] Linux 4.9.80+ arm LE
13 Apr 15:39:07 - [info] Loading palette nodes
13 Apr 15:39:28 - [info] Settings file  : /root/.node-red/settings.js
13 Apr 15:39:28 - [info] User directory : /root/.node-red
13 Apr 15:39:28 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
13 Apr 15:39:28 - [info] Flows file     : /root/.node-red/flows_zeropi.json
13 Apr 15:39:28 - [info] Creating new flow file
13 Apr 15:39:28 - [info] Server now running at http://<IP_ADDRESS>:1880/
13 Apr 15:39:28 - [info] Starting flows
13 Apr 15:39:28 - [info] Started flows
13 Apr 15:40:03 - [info] Installing module: node-red-contrib-ttn, version: 2.0.4
13 Apr 15:40:24 - [info] Installing module: node-red-contrib-lora-packet-converter, version: 1.0.17
(node:20665) [INSPECTOR_ASYNC_STACK_TRACES_NOT_AVAILABLE] Warning: Warning: Async stack traces in debugger are not available on 32bit platforms. The feature is disabled.
13 Apr 15:44:14 - [info] Installed module: node-red-contrib-lora-packet-converter
13 Apr 15:44:15 - [warn] Installation of module node-red-contrib-ttn failed:
13 Apr 15:44:15 - [warn] ------------------------------------------
13 Apr 15:44:15 - [warn] npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t https://github.com/thethingsnetwork/api.git
npm ERR!
npm ERR! fatal: Cannot change to '/root/.node-red/..': Permission denied
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-04-13T10_13_03_776Z-debug.log
13 Apr 15:44:15 - [warn] ------------------------------------------
13 Apr 15:44:19 - [info] Added node types:
13 Apr 15:44:19 - [info]  - node-red-contrib-lora-packet-converter:lora-packet-converter
(node:20665) [INSPECTOR_ASYNC_STACK_TRACES_NOT_AVAILABLE] Warning: Warning: Async stack traces in debugger are not available on 32bit platforms. The feature is disabled.
`

That's weird. How did you install Node.js? Can you try upgrading Node.js?
Also, can you check if the examples in https://github.com/thethingsnetwork/node-app-sdk do work? Let's see if we can isolate this issue from Node-RED, which is harder to debug.

$sudo apt-get install nodejs
Following the instructions here: https://www.thethingsnetwork.org/docs/applications/nodejs/quick-start.html
i get:
pi@zeropi:~/app $ node .
Illegal instruction

ok, looks like node-red shipped with raspbian was quite old. i upgraded nodejs from https://nodejs.org/dist/v9.11.1/node-v9.11.1-linux-armv6l.tar.xz installed to /opt and changed the symlink form /usr/bin to v9.11 and ttn seems to work without any problem!!
pi@zeropi:~/.node-red $ node -v
v9.11.1
sorry for wasting your time..but strange that only ttn used to crash node-red and nothing else

That is weird indeed. Can you confirm that the Node version that Node-RED reports is now v9.11.1?

I deleted :~/.node-red/node_modules/node-red-contrib-ttn and all the reference to ttn in package.json as well as in the package-lock.json. restarted node-red, and installed from pallette...node-red dies with illegal instruction!! Looks like i won't be able to use ttn in node-red on the pi zero...and by the way, another lora related node called lora-packet-decoder works ok.
and node-red reports v9.11.1

pi@zeropi:~/.node-red $ node-red-pi
^C
pi@zeropi:~/.node-red $ node -v
v9.11.1
pi@zeropi:~/.node-red $ npm -v
1.4.21
pi@zeropi:~/.node-red $ node-red-pi
18 Apr 15:05:34 - [info]
Welcome to Node-RED
18 Apr 15:05:34 - [info] Node-RED version: v0.18.4
18 Apr 15:05:34 - [info] Node.js  version: v9.11.1
18 Apr 15:05:34 - [info] Linux 4.9.80+ arm LE
18 Apr 15:05:40 - [info] Loading palette nodes
18 Apr 15:06:11 - [info] Dashboard version 2.8.2 started at /ui
18 Apr 15:06:24 - [warn] ------------------------------------------------------
18 Apr 15:06:24 - [warn] [node-red-node-serialport/serialport] Error: The module '/home/pi/.node-red/noderialport.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 46. This version of Node.js requires
NODE_MODULE_VERSION 59. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install).
18 Apr 15:06:24 - [warn] [node-red-contrib-ovia-os/os] 'NetworkIntf' already registered by module node-re
18 Apr 15:06:24 - [warn] ------------------------------------------------------
18 Apr 15:06:24 - [info] Settings file  : /home/pi/.node-red/settings.js
18 Apr 15:06:24 - [info] User directory : /home/pi/.node-red
18 Apr 15:06:24 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
18 Apr 15:06:24 - [info] Flows file     : /home/pi/.node-red/flows_zeropi.json
18 Apr 15:06:24 - [info] Starting flows
18 Apr 15:06:25 - [info] Started flows
18 Apr 15:06:25 - [info] Server now running at http://<IP_ADDRESS>:1880/
18 Apr 15:07:28 - [info] Installing module: node-red-contrib-ttn, version: 2.0.4
18 Apr 15:09:00 - [info] Installed module: node-red-contrib-ttn
Illegal instruction
pi@zeropi:~/.node-red $

After a little more effort, there is some problem with ttn-app. See the following:
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn/ttn-app $ node ttn-app.js
Illegal instruction

But if i run node with other nodes, no such error message..
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn/ttn-app $ cd ..
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn $ ls
docker-entrypoint.sh  docs      lib      package.json  ttn-app       ttn-event   yarn.lock
Dockerfile            examples  LICENSE  README.md     ttn-downlink  ttn-uplink
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn $ cd ttn-event/
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn/ttn-event $ ls
icons  ttn-event.html  ttn-event.js
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn/ttn-event $ node ttn-event.js
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn/ttn-event $

If i delete ttn-app.js, node-red works without any trouble. Not sure what could be the reason:
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn $ ls
docker-entrypoint.sh  docs      lib      package.json  ttn-app       ttn-event   yarn.lock
Dockerfile            examples  LICENSE  README.md     ttn-downlink  ttn-uplink
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn $ cd ttn-app/
ls
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn/ttn-app $ ls
ttn-app.html  ttn-app.js
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn/ttn-app $ mv ttn-app.js ttn-old-js
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn/ttn-app $ node ttn-old-js
Illegal instruction
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn/ttn-app $ leafpad ttn-old-js
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn/ttn-app $ node ttn-old-js
Illegal instruction
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn/ttn-app $ node ttn-app.js
Illegal instruction
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn/ttn-app $ node-red
18 Apr 15:30:17 - [info]

Welcome to Node-RED
===================

18 Apr 15:30:17 - [info] Node-RED version: v0.18.4
18 Apr 15:30:17 - [info] Node.js  version: v9.11.1
18 Apr 15:30:17 - [info] Linux 4.9.80+ arm LE
18 Apr 15:30:23 - [info] Loading palette nodes
Illegal instruction
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn/ttn-app $ ls
ttn-app.html  ttn-app.js  ttn-old-js
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn/ttn-app $ ls -l
total 12
-rw-r--r-- 1 pi pi 1775 Feb 13 19:36 ttn-app.html
-rw-r--r-- 1 pi pi  972 Apr 18 15:29 ttn-app.js
-rw-r--r-- 1 pi pi  974 Apr 18 15:16 ttn-old-js
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn/ttn-app $ ls -l ../ttn-downlink/
total 12
drwxr-xr-x 2 pi pi 4096 Feb 13 19:36 icons
-rw-r--r-- 1 pi pi 3467 Feb 13 19:36 ttn-downlink.html
-rw-r--r-- 1 pi pi  966 Feb 13 19:36 ttn-downlink.js
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn/ttn-app $ rm ttn-app.js
pi@zeropi:~/.node-red/node_modules/node-red-contrib-ttn/ttn-app $ node-red
18 Apr 15:31:48 - [info]

Welcome to Node-RED
===================

18 Apr 15:31:48 - [info] Node-RED version: v0.18.4
18 Apr 15:31:48 - [info] Node.js  version: v9.11.1
18 Apr 15:31:48 - [info] Linux 4.9.80+ arm LE
18 Apr 15:31:53 - [info] Loading palette nodes
18 Apr 15:32:20 - [info] Dashboard version 2.8.2 started at /ui
18 Apr 15:32:34 - [warn] ------------------------------------------------------
18 Apr 15:32:34 - [warn] [node-red-node-serialport/serialport] Error: The module '/home/pi/.node-red/node_modules/serialport/build/Release/serialport.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 46. This version of Node.js requires
NODE_MODULE_VERSION 59. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
18 Apr 15:32:34 - [warn] [node-red-contrib-ovia-os/os] 'NetworkIntf' already registered by module node-red-contrib-os
18 Apr 15:32:34 - [warn] [node-red-contrib-ttn/ttn-app] Error: Cannot find module '/home/pi/.node-red/node_modules/node-red-contrib-ttn/ttn-app/ttn-app.js'
18 Apr 15:32:34 - [warn] ------------------------------------------------------
18 Apr 15:32:34 - [info] Settings file  : /home/pi/.node-red/settings.js
18 Apr 15:32:34 - [info] User directory : /home/pi/.node-red
18 Apr 15:32:34 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
18 Apr 15:32:34 - [info] Flows file     : /home/pi/.node-red/flows_zeropi.json
18 Apr 15:32:35 - [info] Server now running at http://<IP_ADDRESS>:1880/
18 Apr 15:32:35 - [info] Starting flows
18 Apr 15:32:35 - [info] Started flows

It seems that the node in ttn-event and ttn-app are instantiated differently; the former one has a more graceful early exit, which may not crash Node-RED but still does not work.
The error Illegal instruction doesn't give any pointers, so best is to isolate the issue.
Can you try with the node-app-sdk examples, regardless of Node-RED?

 node -v
v9.11.1

pi@zeropi:~ $ rm -rf app
pi@zeropi:~ $ mkdir app
pi@zeropi:~ $ cd app
pi@zeropi:~/app $ npm install --save ttn
npm WARN engine<EMAIL_ADDRESS>wanted: {"npm":">=1.4.28","node":">=0.12"} (                         current: {"node":"4.8.2","npm":"1.4.21"})
npm WARN engine<EMAIL_ADDRESS>wanted: {"node":">=0.10.40","npm":">=2.0.0"} (curren                         t: {"node":"4.8.2","npm":"1.4.21"})
npm WARN package.json<EMAIL_ADDRESS>No repository field.
npm WARN package.json<EMAIL_ADDRESS>No license field.
npm WARN package.json<EMAIL_ADDRESS>punycode is also the name of a node core mo                         dule.
npm WARN package.json<EMAIL_ADDRESS>string_decoder is also the name of a                          node core module.
|
><EMAIL_ADDRESS>install /home/pi/app/node_modules/ttn/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

[grpc] Success: "/home/pi/app/node_modules/ttn/node_modules/grpc/src/node/extens                         ion_binary/node-v59-linux-arm-glibc/grpc_node.node" is installed via remote
<EMAIL_ADDRESS>node_modules/ttn
├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS><EMAIL_ADDRESS>├──<EMAIL_ADDRESS><EMAIL_ADDRESS>├──<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>├──<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>mqtt-pack<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>                       .0)
├──<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>joi                         @6.10.1)
├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>└──<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>pi@zeropi:~/app $ ls
node_modules
pi@zeropi:~/app $ cd node_modules/
pi@zeropi:~/app/node_modules $ ls
ttn
pi@zeropi:~/app/node_modules $ cd ttn/
pi@zeropi:~/app/node_modules/ttn $ ls
dist  DOCUMENTATION.md  documentation.yml  LICENSE  Makefile  node_modules  package.json  README.md
pi@zeropi:~/app/node_modules/ttn $ cd node_modules/
pi@zeropi:~/app/node_modules/ttn/node_modules $ ls
babel-runtime  debug  google-protobuf  grpc  jsonwebtoken  mqtt  node-fetch  source-map-support  ttnapi
pi@zeropi:~/app/node_modules/ttn/node_modules $ cd mqtt/
pi@zeropi:~/app/node_modules/ttn/node_modules/mqtt $ ls
bin              dist  examples  LICENSE.md  node_modules  README.md  types
CONTRIBUTING.md  doc   lib       mqtt.js     package.json  test
pi@zeropi:~/app/node_modules/ttn/node_modules/mqtt $ node mqtt.js help
MQTT.js command line interface, available commands are:

  * publish     publish a message to the broker
  * subscribe   subscribe for updates from the broker
  * version     the current MQTT.js version
  * help        help about commands

Launch 'mqtt help [command]' to know more about the commands.
pi@zeropi:~/app/node_modules/ttn/node_modules/mqtt $ cd ..
pi@zeropi:~/app/node_modules/ttn/node_modules $ ls
babel-runtime  debug  google-protobuf  grpc  jsonwebtoken  mqtt  node-fetch  source-map-support  ttnapi
pi@zeropi:~/app/node_modules/ttn/node_modules $ cd ttnapi/
pi@zeropi:~/app/node_modules/ttn/node_modules/ttnapi $ ls
api.pb.go     api.proto  gateway        LICENSE    networkserver  python     trace
api_pb.js     broker     gen-python.sh  logfields  package.json   README.md  utils
api_pb.rb     c          handler        Makefile   php            reference  validation.go
api.pb.swift  discovery  java           monitor    protocol       router
pi@zeropi:~/app/node_modules/ttn/node_modules/ttnapi $ node api_pb.js
pi@zeropi:~/app/node_modules/ttn/node_modules/ttnapi $ cd monitor/
pi@zeropi:~/app/node_modules/ttn/node_modules/ttnapi/monitor $ ls
monitorclient            Monitor.md     monitor_pb.rb     monitor.server.pb.swift
monitor.client.pb.swift  monitor.pb.go  monitor.pb.swift  monitor_services_pb.rb
monitor_grpc_pb.js       monitor_pb.js  monitor.proto
pi@zeropi:~/app/node_modules/ttn/node_modules/ttnapi/monitor $ node monitor_pb.js
/home/pi/app/node_modules/ttn/node_modules/google-protobuf/google-protobuf.js:154
goog.object.extend=function(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<goog.object.PROTOTYPE_FIELDS_.length;f++)c=goog.object.PROTOTYPE_FIELDS_[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};
                                                                                ^

TypeError: Cannot convert undefined or null to object
    at hasOwnProperty (<anonymous>)
    at Object.goog.object.extend (/home/pi/app/node_modules/ttn/node_modules/google-protobuf/google-protobuf.js:154:232)
    at Object.<anonymous> (/home/pi/app/node_modules/ttn/node_modules/ttnapi/monitor/monitor_pb.js:20:13)
    at Module._compile (internal/modules/cjs/loader.js:654:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
    at startup (internal/bootstrap/node.js:201:19)
pi@zeropi:~/app/node_modules/ttn/node_modules/ttnapi/monitor $ cd ..

pi@zeropi:~/app/node_modules/ttn/node_modules/ttnapi $ cd broker/
pi@zeropi:~/app/node_modules/ttn/node_modules/ttnapi/broker $ ls
brokerclient            Broker.md     broker.pb.swift         getters.go                  random_test.go
broker.client.pb.swift  broker.pb.go  broker.proto            message_marshaling.go       util.go
broker_grpc_pb.js       broker_pb.js  broker.server.pb.swift  message_marshaling_test.go  validation.go
BrokerManager.md        broker_pb.rb  broker_services_pb.rb   random.go
pi@zeropi:~/app/node_modules/ttn/node_modules/ttnapi/broker $ node broker_pb.js

these seem to work ok, without causing illegal instruction. if you want me to test any specific .js using node.js, please indicate as this sdk is huge and without knowing how it works, it is going to take me huge amount of time!

Thanks. Can you git clone https://github.com/TheThingsNetwork/node-app-sdk.git and follow instructions on https://github.com/thethingsnetwork/node-app-sdk?
Specifically the sections Test, Quality, Build and Example.
It might be that the Build step produces different output for your processor architecture, so building it on your Pi Zero may make it work in the Example.

I am new to this nodejs environment and toolchain. so i might have missed some step. anyhow make test gives the following illegal instruction
pi@zeropi:~/test/node-app-sdk $ make test
node-app-sdk  testing 6 js files
 FAIL  src/data/data.test.js (22.066s)
  ● DataClient.on('error')

    Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.

      at pTimeout (node_modules/jest-jasmine2/build/queueRunner.js:53:21)
      at Timeout.callback [as _onTimeout] (node_modules/jsdom/lib/jsdom/browser/Window.js:523:19)
      at ontimeout (timers.js:466:11)
      at tryOnTimeout (timers.js:304:5)
      at Timer.listOnTimeout (timers.js:267:5)

  ● DataClient.on('error')

    expect.assertions(2)

    Expected two assertions to be called but only received zero assertion calls.

      at addAssertionErrors (node_modules/jest-jasmine2/build/setup-jest-globals.js:68:21)
          at <anonymous>

 PASS  src/utils/is-token.test.js
 PASS  src/data/topic.test.js

 RUNS  src/discovery/discovery.test.js
.make/js/quality.make:26: recipe for target 'js.test' failed
make: *** [js.test] Illegal instruction
pi@zeropi:~/test/node-app-sdk $

make typecheck says platform not supported for flow-bin/cli.js
pi@zeropi:~/test/node-app-sdk $ make typecheck
node-app-sdk  typechecking all files
/home/pi/test/node-app-sdk/node_modules/flow-bin/cli.js:20
  throw new Error('Platform not supported.');
  ^

Error: Platform not supported.
    at Object.<anonymous> (/home/pi/test/node-app-sdk/node_modules/flow-bin/cli.js:20:9)
    at Module._compile (internal/modules/cjs/loader.js:654:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
    at startup (internal/bootstrap/node.js:201:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)
Makefile:35: recipe for target 'typecheck' failed
make: *** [typecheck] Error 1

make quality doesn't proceed because make typecheck fails:

pi@zeropi:~/test/node-app-sdk $ make quality
node-app-sdk  linting 33 js files
The react/jsx-space-before-closing rule is deprecated. Please use the react/jsx-tag-spacing rule with the "beforeSelfClosing" option instead.
node-app-sdk  typechecking all files
/home/pi/test/node-app-sdk/node_modules/flow-bin/cli.js:20
  throw new Error('Platform not supported.');
  ^

Error: Platform not supported.
    at Object.<anonymous> (/home/pi/test/node-app-sdk/node_modules/flow-bin/cli.js:20:9)
    at Module._compile (internal/modules/cjs/loader.js:654:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
    at startup (internal/bootstrap/node.js:201:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)
Makefile:35: recipe for target 'typecheck' failed
make: *** [typecheck] Error 1
pi@zeropi:~/test/node-app-sdk $

On the contrary make build proceeds without any errors:```
pi@zeropi:~/test/node-app-sdk $ make build
src/account/account.js -> dist/account/account.js
src/account/index.js -> dist/account/index.js
src/applications/applications.js -> dist/applications/applications.js
src/applications/index.js -> dist/applications/index.js
src/applications/normalize.js -> dist/applications/normalize.js
src/applications/types.js -> dist/applications/types.js
src/data/data.js -> dist/data/data.js
src/data/index.js -> dist/data/index.js
src/data/topic.js -> dist/data/topic.js
src/discovery/discovery.js -> dist/discovery/discovery.js
src/discovery/index.js -> dist/discovery/index.js
src/handler/handler.js -> dist/handler/handler.js
src/handler/index.js -> dist/handler/index.js
src/index.js -> dist/index.js
src/utils/debug.js -> dist/utils/debug.js
src/utils/index.js -> dist/utils/index.js
src/utils/is-token.js -> dist/utils/is-token.js
src/utils/key.js -> dist/utils/key.js
src/utils/wrap.js -> dist/utils/wrap.js
but little success if i go to the dist folder:

pi@zeropi:~/test/node-app-sdk $ cd dist/
pi@zeropi:~/test/node-app-sdk/dist $ ls
account  applications  data  discovery  handler  index.js  utils
pi@zeropi:~/test/node-app-sdk/dist $ cd applications/
pi@zeropi:~/test/node-app-sdk/dist/applications $ ls
applications.js  index.js  normalize.js  types.js
pi@zeropi:~/test/node-app-sdk/dist/applications $ node applications.js
Illegal instruction
pi@zeropi:~/test/node-app-sdk/dist/applications $

So looks like i'm stuck.

In addition to this, i've unrelated problem in TTN http integration, i've forwrded all the payload to google firebase via its REST API. requests are delayed by upto 4-5 hours! i raised a question on ttn forums but there was no response...not sure what is the right place to go..

Thanks. It may be a platform issue indeed with one of the dependencies, making the Pi Zero an unsupported platform for this library.
Can you verify and run the examples (so not dist)? See https://github.com/TheThingsNetwork/node-app-sdk/tree/master/examples

pi@zeropi:~ $ cd test/node-app-sdk/examples/
pi@zeropi:~/test/node-app-sdk/examples $ ls
account.js  application.js  data.js  discovery.js  es5
pi@zeropi:~/test/node-app-sdk/examples $ node application.js
/home/pi/test/node-app-sdk/examples/application.js:6
import { application as App, key } from "../src"
^^^^^^

SyntaxError: Unexpected token import
    at new Script (vm.js:51:7)
    at createScript (vm.js:136:10)
    at Object.runInThisContext (vm.js:197:10)
    at Module._compile (internal/modules/cjs/loader.js:618:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
    at startup (internal/bootstrap/node.js:201:19)
pi@zeropi:~/test/node-app-sdk/examples $

here is what ../src looks like:
pi@zeropi:~/test/node-app-sdk/examples $ ls ../src/
account  applications  data  discovery  handler  index.js  utils

From the es5 directory:
pi@zeropi:~/test/node-app-sdk/examples $ cd es5/
pi@zeropi:~/test/node-app-sdk/examples/es5 $ ls
application.js  data.js
pi@zeropi:~/test/node-app-sdk/examples/es5 $ node application.js
Illegal instruction
pi@zeropi:~/test/node-app-sdk/examples/es5 $
pi@zeropi:~/test/node-app-sdk/examples/es5 $ node data.js
Illegal instruction

It seems some dependencies were outdated. I upgraded them, see the feature/update-deps branch (https://github.com/TheThingsNetwork/node-app-sdk/tree/feature/update-deps)
Can you check again? Best is to remove the node_modules and try install everything with yarn.
Finally, please let me know your node -v output.

Its compiling. looks like it will take a few more days...
pi@zeropi:~/test/node-app-sdk $ yarn install
yarn install v1.6.0
[1/4] Resolving packages...
[2/4] Fetching packages...
info<EMAIL_ADDRESS>The platform "linux" is incompatible with this module.
info<EMAIL_ADDRESS>is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "eslint-config-ttn ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>|| ^3.0.0".
[4/4] Building fresh packages...
[1/1] ⠐ grpc
[-/1] ⠈ waiting...
[-/1] ⠈ waiting...
[-/1] ⠈ waiting...
[-/1] ⠈ waiting...
[1

Inspite of trying several times, it gives me out of memory error.

OK. I'm afraid we have to keep this one open. I cannot reproduce due to limited access to hardware.

i will try again after a month or so. i'm a bit busy with my "real life" maybe i will try with some swap memory on the pi zero which only has like 512mb ram. to save sdcard corruption i turned off swap. if i use node directly with any of the .js it gives me some import error

OK. I'm afraid we have to keep this one open.

@johanstokking : Did you ever reach a conclusion with this issue?  Unsupported platform armV6l?  I have put mosquitto and Node-Red on a Pi Zero W which already runs a TTN packet forwarder (Rak radio) for a student needs to do some LoRaWAN project work.  Everything is stable until I use the palette manager to install this node.  Node-red crashes and node hogs almost all cpu and memory.  Has this been a recurring issue?  Will this ever work on Pi Zero W?  Thanks GryKyo

@GryKyo I'm quite sure the issue is related to the compilation of a gRPC dependency. Can you try running npm install -g ttn from command line and copy the output?

I thought I would share this as the exact same thing just happened with me on booth Raspberry Pi Zero W and Raspberry Pi 3 B+
if of any help, see my pots on Node-Red Forum: https://discourse.nodered.org/t/code-killed-status-4-ill/9627?u=ruifcsilva

Yes, I can also confirm this on RPi0W, RPi3B+, and RPi1B+ happing.
Any news on this?

I can confirm as well, as soon as I install node-red-contrib-ttn on the raspberry pi zero w either from the palette manager or via npm i from the console, node-red just doesn't want to start. I have to remove it with
rm -rf node_modules/node-red-contrib-ttn sudo service nodered restart
and it comes back alive.
May 30 16:14:07 raspberrypi systemd[1]: Started Node-RED graphical event wiring tool. May 30 16:14:20 raspberrypi Node-RED[2913]: 30 May 16:14:20 - [info] May 30 16:14:20 raspberrypi Node-RED[2913]: Welcome to Node-RED May 30 16:14:20 raspberrypi Node-RED[2913]: =================== May 30 16:14:20 raspberrypi Node-RED[2913]: 30 May 16:14:20 - [info] Node-RED version: v0.20.3 May 30 16:14:20 raspberrypi Node-RED[2913]: 30 May 16:14:20 - [info] Node.js  version: v10.15.3 May 30 16:14:20 raspberrypi Node-RED[2913]: 30 May 16:14:20 - [info] Linux 4.14.98+ arm LE May 30 16:14:26 raspberrypi Node-RED[2913]: 30 May 16:14:26 - [info] Loading palette nodes May 30 16:14:51 raspberrypi systemd[1]: nodered.service: Main process exited, code=killed, status=4/ILL May 30 16:14:52 raspberrypi systemd[1]: nodered.service: Unit entered failed state. May 30 16:14:52 raspberrypi systemd[1]: nodered.service: Failed with result 'signal'. May 30 16:14:52 raspberrypi systemd[1]: nodered.service: Service hold-off time over, scheduling restart. May 30 16:14:52 raspberrypi systemd[1]: Stopped Node-RED graphical event wiring tool.

I managed to knock out Node-Red on a PiZero based TTN gateway once again by installing this, so yes I can confirm that this is still an issue.
G

Please provide context; Node version, Node-RED version, error messages, output from installation, etc.

Device: Raspberry Pi Zero W Official
Node version: v10.15.3
Node-Red: v0.20.3
Install with ssh cd ~/.node-red && npm install node-red-contrib-ttn
output:
`pi@raspberrypi:~/.node-red $ npm install node-red-contrib-ttn
npm WARN<EMAIL_ADDRESS>No repository field.
npm WARN<EMAIL_ADDRESS>No license field.

<EMAIL_ADDRESS>added 1 package from 1 contributor and audited 2752 packages in 271.506s
found 49 vulnerabilities (35 moderate, 14 high)
run `npm audit fix` to fix them, or `npm audi\t for details

output from   journalctl -u nodered.service --since today -f
May 31 22:18:25 raspberrypi systemd[1]: Started Node-RED graphical event wiring tool. May 31 22:18:35 raspberrypi Node-RED[13356]: 31 May 22:18:35 - [info] May 31 22:18:35 raspberrypi Node-RED[13356]: Welcome to Node-RED May 31 22:18:35 raspberrypi Node-RED[13356]: =================== May 31 22:18:35 raspberrypi Node-RED[13356]: 31 May 22:18:35 - [info] Node-RED version: v0.20.3 May 31 22:18:35 raspberrypi Node-RED[13356]: 31 May 22:18:35 - [info] Node.js  version: v10.15.3 May 31 22:18:35 raspberrypi Node-RED[13356]: 31 May 22:18:35 - [info] Linux 4.14.98+ arm LE May 31 22:18:40 raspberrypi Node-RED[13356]: 31 May 22:18:40 - [info] Loading palette nodes May 31 22:19:06 raspberrypi systemd[1]: nodered.service: Main process exited, code=killed, status=4/ILL May 31 22:19:07 raspberrypi systemd[1]: nodered.service: Unit entered failed state. May 31 22:19:07 raspberrypi systemd[1]: nodered.service: Failed with result 'signal'. May 31 22:19:07 raspberrypi systemd[1]: nodered.service: Service hold-off time over, scheduling restart. May 31 22:19:07 raspberrypi systemd[1]: Stopped Node-RED graphical event wiring tool.

@johanstokking Did you get a chance to check out this bug? I would really like to have ttn working on my node red on the raspberry pi zero W. If you need any help from me let me know what I can do, test or fix. Cheers

I think I have found the culprit... https://github.com/grpc/grpc
Specifically this issue
https://github.com/grpc/grpc/issues/13258
Going to try and do a workaround

I found a workaround,
Install the package from either the palete manager in node red, or through npm i,
cd ~/.node-red
npm rebuild --build-from-source=grpc
!Warning, it will take a long time, don't know exactly how long cause I just left the terminal open.
and then do:
sudo service nodered restart
And you should be all set to go.

Great, thanks so much @dusnoki
Should we update the README?

RPi support is now deprecated. We'll add guides for V3 to work with builtin Node-RED nodes (i.e. the MQTT input and output nodes)


Support multiple values for githubOrg

For the benefit of npm Enterprise, it should probably accept both an array and a string value that can be parsed into multiple values.

Any news on this? I'm not aware of all the changes needed in npm enterprise to support this, but to implement it here we can simply query all the orgs until the user is authenticated in one of them, like (credits to @xaka).
authenticator.js (line 84)
  }).then(_this.githubOrg && function(token) {
    return Promise.any([].concat(_this.githubOrg).map(function (githubOrg) {
      return new Promise(function(resolve, reject) {
        github.orgs.getMember({ user: username, org: githubOrg }, function(err, res) {
          if (err) reject(err);
          else resolve(token);
        });
      });
    })).catch(function(err) {
      // handle possible AggregateError, which is a collection of promise errors
      err = err instanceof Promise.AggregateError ? err[0] : err;

      if (err.code === 404) {
        err.code = 401;
        err.message = 'unauthorized';
      } else if (err.code === 500) {
        err.message = 'GitHub enterprise unavailable';
      }

      // this is an error state
      throw err;
    });
  });
};

To support either an array and a string value, you can do the following (tests here):
var items = !Array.isArray(_this.githubOrg) ? _this.githubOrg.split(/,[\s]*/) : value;

But I'm not sure if this is the right place to do it. If so, the line should be added above the return Promise.any([].concat(....
Also, I'd like to know if there's a way to test this code locally / setup steps run the tests, as my current tests failed because Redis is not present locally:
➜  npme-auth-github git:(master) ✗ npm run test

><EMAIL_ADDRESS>test /Users/marianovazquez/projects/npme-auth-github
> lab -v -c --timeout 1000 test/ --ignore '$$bole'

events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: Redis connection to <IP_ADDRESS>:6379 failed - connect ECONNREFUSED <IP_ADDRESS>:6379
    at Object.exports._errnoException (util.js:1026:11)
    at exports._exceptionWithHostPort (util.js:1049:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1085:14)

@nanovazquez in my QA; #39 doesn't seem to quite do the trick, because at publish time it gets an invalid org error, caused by: https://github.com/npm/npme-auth-github/blob/master/authorizer.js#L83
I think it should be a pretty quick fix; if you get to it before me I can land the feature ASAP.

@bcoe: there you go #40
I'm using the same approach the ** authenticator.js** uses: this.githubOrg could be an Array, a CSV or a single value. We simply check if the parameter received is one of the orgs defined via configuration.

@nanovazquez I just released a new version of npm Enterprise with support for multiple organizations (via your patch); please let me know if this does the trick for you.

@bcoe: Does this update contains the fix? This is the latest version I see in the website.

@nanovazquez yes! let me know if you run into any issues.

Worked! Thanks :)

@bcoe: Worked! Thanks for taking care of this :)


Add themes

we could add this using sessions but we need to finish the frontend first

dark/light theme?

Yes


NEW Elements can be deleted via the inline delete button. Fix versioning state in readBlocks query

This pull request adds the ability to delete an element from the editor using a similar button to that of the PHP GridField delete action.
Other changes:

.element-editor__element is now a span rather than an anchor, since we're nesting a button inside it. It has the necessary role and tabIndex as well as click and keypress handlers for accessiblity.
ReadBlocksForPage GraphQL query's versioning mode was incorrectly reading from the "latest" stage, it should be reading from draft since it's in the CMS

After the delete mutation runs it refetches the list of elements, which sets the loading prop on the ElementList to true while it's running. Once we have a loading indicator (#309) this will work automatically.
Resolves #305

In this case do we have to bother with a refetch? Can't we just find a way to remove the element from the list and be done with it?

That would involve mutating the blocks array prop. I think there is a way to do this with apollo's imperative cache API but I'm not sure how to do it yet - this is what we've been doing so far for history viewer anyway

Do you think we should include some sort of loading indication during deletion before this is merged? Currently you are just staring at the block you deleted for a bit before it actually disappears.

@ScopeyNZ yep, the loading prop is set by GraphQL but there's no indicator yet (noted in description)

Merging with @ScopeyNZ's approval


⚠ Turnos 24x7 has degraded performance

In 2b06026, Turnos 24x7 (https://reservas-dev.alternativasinteligentes.com/) experienced degraded performance:

HTTP code: 200
Response time: 6812 ms

Resolved: Turnos 24x7 performance has improved in d40c677.


Rename references of "layer" to "job" in firebase schema

Towards #1122

@JSunde  PTAL?

/gcbrun


Fix up, down, and enter keys in tracklist

#292

Heh, are there any eslint rules for that?

I guess not. Eslint wouldn't know if it's a static method or not.

It wouldn't help with this problem, but there's this

maybe this one http://eslint.org/docs/rules/array-callback-return ?

Good find, @YurySolovyov! That caught it. I added the config for it.

Thanks for the fix.


Dec. 5 Push to Prod

Documentation Added

New Divider Utility Component - https://ui-components.alberta.ca/?path=/docs/utility-divider--spacing
New Block Utility Component - https://ui-components.alberta.ca/?path=/docs/utility-block--horizontal
New Grid Utility Component - https://ui-components.alberta.ca/?path=/docs/utility-grid--basic
New Spacer Utility Component - https://ui-components.alberta.ca/?path=/docs/utility-spacer--basic
New properties added to all components to allow for controlling margin around the components (mt, mr, mb, and ml)
These additions help teams control their layouts in ways that suit their contexts.

Documentation Changes

Changed all Angular binding examples to show how to do Reactive style binding instead
Documentation created for how to use our templates - https://ui-components.alberta.ca/?path=/docs/setup-using-templates--page
Updated a few properties for input components to show they are required for React components
Updated Contribution documentation for accurate commands to run when starting out

Bugs Fixed

When using the date and date-time input component types, AM would change to PM upon repeated selections. This change no longer happens.

:tada: This PR is included in version 4.2.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.2.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.1.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 4.0.0-alpha.92 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.0.0-alpha.132 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.0.0-alpha.19 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 2.0.0-alpha.11 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 2.0.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket: