fix: linux battery capacity

Fixes for #569
Important notes:

From my tests getValue works correctly in terms of getting correct battery values on all three platforms. But I'm fairly sure it's used in other places that I didn't check.
I've found that on Manjaro and Ubuntu there is a way to get correct AC status instead of relying on isCharging which turns acConnected false when charging stops which is not true. I've implemented this as a readFileSync to not mess much with the logic you have there, but if you want this probably can be updated to some promises or some callback chain. I don't think this sync messes up there a lot, but up to you :)

Results (with correct acConnected state while isCharging false as well):

I've just noticed when adding the screen ACPI returns mAh, so this will need a conversion after all, but a bit different. On it.

@plakak Hi again, I had to revert back your change in util.js line 115:
if (line.startsWith(property) && line.match(property + separator))

to
if (line.startsWith(property)) {

... because it unfortunately broke the package on several places ...
Please can you check, if you need this extra check in getValue and why you introduced it. Maybe we can make a workarroud for your special case here ...

@sebhildebrandt The exact check with line.match is crucial fix with designed & max capacity being always the same on linux. I'll create a PR that separates this for Linux only not to brake anything else :)

@plakak very clear. So this is kind of a specific comparison ... I will add a parameter for that. No need to make a pull request ;-)

@sebhildebrandt in Linux there are POWER_SUPPLY_CHARGE_FULL & POWER_SUPPLY_CHARGE_FULL_DESIGN. If we just use startsWith, since both of them start with POWER_SUPPLY_CHARGE_FULL, the first one is always taken instead of the second one. Thanks :)

@plakak OK, very clear, so I do only need to add the param for lineMatch for those four lines  (so also for POWER_SUPPLY_ENERGY_FULL & POWER_SUPPLY_ENERGY_FULL_DESIGN I guess) ...
pushed a fix here on GitHub ... can you check it on your side? Thank you for all your support!!!

@sebhildebrandt right, ENERGY as well. I've checked the newest master and it works correctly. 🙌🏻
I did notice one more thing though - if you have a moment while we're at it. The designedCapacity is calculated based on current voltage and it changes constantly as voltage fluctuates during charging/discharging. But linux provides value POWER_SUPPLY_VOLTAGE_MIN_DESIGN (in my case it's a constant 11400000). I guess we should count the designedCapacity with this value (if available) instead of current voltage.
I just checked it and this is correct - I get spot on value with what system reports when
const desingedMinVoltage = parseInt('0' + util.getValue(lines, 'POWER_SUPPLY_VOLTAGE_MIN_DESIGN', '='), 10) / 1000000.0;
result.designedCapacity = Math.round(parseInt('0' + util.getValue(lines, 'POWER_SUPPLY_CHARGE_FULL_DESIGN', '=', true, true), 10) / 1000.0 * (desingedMinVoltage || result.voltage || 1))

@plakak ... perfect ... thank you for a fix also for that! Just pushed a fix here on github.

@plakak version 5.8.9 just published to npm

@sebhildebrandt tested - everything works 🎉
My pleasure and thanks for such amazing library 🙂

@plakak ... and once again thank you for your support and help!


Array 'With' method implementation

#594
implemented Array 'with' method and removed the formatting as well @mmoskal

@mmoskal Apologies for the delay, I have updated the code and resolved the conflicts.


[feature][doc]Add doc for how to use MultiRolesTokenAuthorizationProvider

Motivation
Fix #14741
Modifications
Add doc for how to use MultiRolesTokenAuthorizationProvider.
Preview looks good.

Documentation

[x] doc

Hi @RobertIndie @codelipenghui @Anonymitaet can you pls review this PR? feel free to comment.

@momo-jun any other doc versions should be applied the same changes?

@momo-jun any other doc versions that should be applied to the same changes?

Yes, thanks for your reminder. Checked with @RobertIndie, I've added the doc for 2.8.1 and later versions.

@momo-jun any other doc versions that should be applied to the same changes?

Yes, thanks for your reminder. Checked with @RobertIndie, I've added the doc for 2.8.1 and later versions.

You can update 2.8.1 docs in this PR

@momo-jun any other doc versions that should be applied to the same changes?

Yes, thanks for your reminder. Checked with @RobertIndie, I've added the doc for 2.8.1 and later versions.

You can update 2.8.1 docs in this PR

I've done that in my last commit. PTAL.


UI for actions

There is no web interface for managing device actions so currently the only access is via PUTs to the api/devices/action endpoint.
There needs to be a table and a form on the device view.

Done for TV. Creating a new ticket for mobiles.


graphqlExpress & graphiqlExpress return undefined.

in the file:
apollo/server/core/main-server.js
import { graphqlExpress, graphiqlExpress } from 'apollo-server-express';
are being undefined for:
"apollo-server-express": "^2.0.0",

Jumped the gun.  Assumed this was 2 Apollo Server 2.0 ready already.  Will await the push :)


Async Query: When async queries are enabled, errors aren't being displayed

What happened:
When testing Redshift with redshiftAsyncQueryDataSupport feature toggle enabled, the errors coming from Redshift backend aren't shown
Before enabling feature toggle:

After enabling feature:

What you expected to happen:
I expected the error to be displayed under the editor.
How to reproduce it (as minimally and precisely as possible):

Enable redshiftAsyncQueryDataSupport=true feature toggle in custom.ini
Create a new panel and select Redshift as a datasource
Enter random string in the sql editor ("test" here)
Click Run
Observe that the query fails and a red ! appears at the top of the panel plugin, but there is no error about the specifics displayed in the QueryEditor

**After debugging: **
The error is coming to the frontend in this format:

Usually, this response comes with a refId. In this format, QueryEditorRow in main grafana can handle it (cross check the refId with the panel id) and display it under the corresponding editor.
However, currently this error is comes without the refId, which is why the Editor can't display it. Looks like somewhere in the BE we just need to re-include the refId.
Also, this could be an issue with aws-sdk package, but I put it here since I reproduced it in Redshift (haven't tested in Athena). It can totally be transfered if it ends up being there.

Note for whoever picks this up:
If you end up working across multiple repos, try setting up a go workspace. See comment here: https://github.com/grafana/oss-plugin-partnerships/issues/141#issuecomment-1426066064

Some status update/note-taking:
During the release of async-query-data:

the npm bump version workflow failed
I see it uses grafanabot -- might be a good time to "Use GitHub Apps (not @grafanabot)"


Some basic questions (maybe Bugs)

Hi,
first of all, thank you so much for maintaining this im-/exporter! I previously used one of the predecessors (seemingly not maintained anymore), which had some issues. Some of these remained in your version, but maybe the problem is on my side:

When loading a base color texture in the plugin, it will be interpreted as "non color" by default. Is this correct? Until now i used sRGB-Encoding which seems to be the way, MSFS interprets the textures.
EDIT: I just found in the MSFS SDK Documentation, that base color shall be linear. This means, when i create textures (currently using GIMP), i have to set the encoding to 8bit-linear RGB, is that correct?

The normal maps in MSFS are interpreted according to DirectX, whereas in Blender (at least on linux) it is OpenGL. This results in different behaviour of normal textures in MSFS and Blender. I used a workaround, namely manually adding a "RGB Curves" Node in Blenders shader and using it to invert the green channel of the normal texture.

It would be really nice to have some kind of "ambient occlusion preview"-option. I figured, this might be possible by "mixing" the albedo/base color with the occlusion texture. A more advanced version would use some diffentiation between direct light sources and ambient light sources in blenders "Shading Workspace".

As you might have noticed, i would like to build my scenery objects in blender and have a preview on how it will look like in MSFS. I'm not a pro in 3d-modelling for games, so maybe i have misunderstood something. Would like to hear from you!
Thanks,
Christopher

Hi @chwilluweit
1- you are right on the first question your texture should be linear
2 - currently MSFS only supports DirectX normal map, you should generate and works only with DirectX normal map,
to have a correct preview in blender we have to change the shader tree so that the axis are inverted and Blender preview works DirectX input textures, you can raise a bug for it
3- indeed we should preview the occlusion you can add a feature request for it

Hello,
This should be updated with the new exporter version.
Thank you for your report !


Porting commands to engine-q list

Engine-q will become Nushell's new parsing and evaluation engine in the future. As part of this, we'll port the existing Nushell commands into Engine-q. Much of this porting can be done mechanically, as while the two systems differ, they are similar enough that many commands can be ported following the steps below.
You can sign up to help out porting a command by commenting on this issue.
Our preference when sending us a Pull Request (PR) is to do one command at a time.  It makes it a lot easier for us to review the code as well as making the merge conflicts easier to figure out...
 Basic support in. Binary not yet supported

flatten

done
@onthebridgetonowhere

for

core
done

format

strings
done
@aslynatilla

format
filesize

from

formats
done

from
csv
formats
done
@jntrnr

from
eml
formats
done
@luccasmmg

from
ics
formats
done
@luccasmmg

from
ini
formats
done
@luccasmmg

from
json
formats
done

from
ods
formats
done
@luccasmmg

from
ssv
formats
done
@luccasmmg

from
toml
formats
done
@luccasmmg

from
tsv
formats
done
@jntrnr

from
url
formats
done
@luccasmmg

from
vcf
formats
done
@luccasmmg

from
xlsx
formats
done
@luccasmmg

from
xml
formats
done
@luccasmmg

from
yaml
formats
done
@luccasmmg

from
yml
formats
done
@luccasmmg

g

get

filters
done

group-by

group-by
date

hash

done
@CBenoit

hash
base64

@CBenoit

hash
md5

done
@CBenoit

hash
sha256

done
@CBenoit

headers

help

core
mostly done
Still needs syntax highlighting

histogram

history

if

core
done

ignore

done
@hustcer

insert

into

conversions
done

into
bool
conversions
done

into
binary
conversions
done

into
column_path
conversions

into
datetime
conversions
done

into
decimal
conversions
done

into
filesize
conversions
done

into
int
conversions
done

into
path
conversions
done
Done? No longer necessary

into
string
conversions
done
@onthebridgetonowhere

keep
until

done
@arthur-targaryen

keep
while

done
@arthur-targaryen

kill

done
@Scorpil

last

filters
done
@stormasm

length

filters
done

let

core
done

let-env

done

lines

filters
done

load-env

ls

filesystem
done
@jntrnr

math

done
@luccasmmg is working on all of the math commands below

math
abs

done
@luccasmmg

math
avg

done
@luccasmmg

math
ceil

done

math
eval

done

math
floor

done

math
max

done
@luccasmmg

math
median

done

math
min

done
@luccasmmg

math
mode

done

math
product

done

math
round

done

math
sqrt

done

math
stddev

done

math
sum

done

math
variance

done
@luccasmmg is working on all of the math commands above here

merge

mkdir

filesystem
done

move

mv

filesystem
done

n

@jntrnr

nth

filters
done
@stormasm

open

done
@jntrnr

p

@jntrnr

parse

done
@CBenoit

path

done
@LiHRaM

path
basename

done
@LiHRaM

path
dirname

done
@LiHRaM

path
exists

done
@LiHRaM

path
expand

done
@LiHRaM

path
join

done
@LiHRaM

path
parse

done
@LiHRaM

path
relative

done
@LiHRaM

path
split

done
@LiHRaM

path
type

done
@LiHRaM

pathvar

done
@kubouch switched e-q to using Value instead of String for env vars

pivot

post

prepend

filters
done
@stormasm

ps

done

pwd

@Scorpil

random

done
@jaeheonji

random
bool

done
@jaeheonji

random
chars

done
@jaeheonji

random
decimal

done
@jaeheonji

random
dice

done
@jaeheonji

random
integer

done
@jaeheonji

random
uuid

done
@jaeheonji

range

filters
done
@stormasm

reduce

@kubouch

reject

filters
done
@stormasm

rename

reverse

filters
done
@stormasm

rm

done

roll

roll
column

roll
up

rotate

rotate
counter-clockwise

save

select

filters
mostly done
Still needs to have latest changes ported from nushell

seq

seq
date

shells

@jntrnr

shuffle

filters
done
@stormasm

size

done

skip

done
@arthur-targaryen

skip
until

done
@arthur-targaryen

skip
while

done
@arthur-targaryen

sleep

done
@Scorpil

sort-by

source

mostly done
currently a bit buggy, needs some testing

split

done

split
chars

done

split
column

done

split
row

done

split-by

str

done
@onthebridgetonowhere

str
camel-case

done
@onthebridgetonowhere

str
capitalize

done
@onthebridgetonowhere

str
collect

done
@onthebridgetonowhere

str
contains

done
@onthebridgetonowhere

str
downcase

done
@onthebridgetonowhere

str
ends-with

done
@onthebridgetonowhere

str
find-replace

done
@onthebridgetonowhere

str
index-of

done
@onthebridgetonowhere

str
kebab-case

done
@onthebridgetonowhere

str
length

done
@onthebridgetonowhere

str
lpad

done
@onthebridgetonowhere

str
pascal-case

done
@onthebridgetonowhere

str
reverse

done
@onthebridgetonowhere

str
rpad

done
@onthebridgetonowhere

str
screaming-snake-case

done
@onthebridgetonowhere

str
snake-case

done
@onthebridgetonowhere

str
starts-with

done
@onthebridgetonowhere

str
substring

done
@onthebridgetonowhere

str
trim

done
@onthebridgetonowhere

str
upcase

done
@onthebridgetonowhere

sys

system
done

table

viewers
done
output and theming now available

tags

done
Ported as metadata

to

done

to
csv

done
@luccasmmg

to
html

done
@luccasmmg

to
json

done
@jntrnr

to
md

done
@luccasmmg

to
toml

done
@luccasmmg

to
tsv

done
@luccasmmg

to
url

done
@luccasmmg

to
xml

done
@luccasmmg

to
yaml

done
@luccasmmg

touch

filesystem
done

tutor

unalias

uniq

done
@onthebridgetonowhere

unlet-env

done
now part of hide

update

done

update
cells

url

done
@jaeheonji

url
host

done
@jaeheonji

url
path

done
@jaeheonji

url
query

done
@jaeheonji

url
scheme

done
@jaeheonji

version

done
@onthebridgetonowhere

where

filters
done

which

@Scorpil

with-env

done
@jntrnr

wrap

filters
done

zip

done

$nu

mostly done
@jntrnr

$scope

done
this is done as a simple implementation, but feel free to improve it

Missing features/commands

[ ] command [autoenv trust] with parameter [dir] is missing in eq
[ ] command [autoenv trust] with parameter [quiet] is missing in eq
[ ] command [autoenv untrust] with parameter [dir] is missing in eq
[ ] command [autoenv untrust] with parameter [quiet] is missing in eq
[ ] command [benchmark] with parameter [passthrough] is missing in eq
[x] command [binaryview] with parameter [bytes] is missing in eq <-- not porting
[x] command [binaryview] with parameter [lores] is missing in eq <-- not porting
[x] command [binaryview] with parameter [skip] is missing in eq <-- not porting
[ ] command [chart bar] with parameter [columns] is missing in eq
[ ] command [chart bar] with parameter [format] is missing in eq
[ ] command [chart bar] with parameter [acc] is missing in eq
[ ] command [chart bar] with parameter [use] is missing in eq
[ ] command [chart line] with parameter [columns] is missing in eq
[ ] command [chart line] with parameter [format] is missing in eq
[ ] command [chart line] with parameter [acc] is missing in eq
[ ] command [chart line] with parameter [use] is missing in eq
[ ] command [compact] with parameter [rest] is missing in eq
[x] command [dfr drop-duplicates] with parameter [subset] is missing in eq
[x] command [dfr drop-duplicates] with parameter [maintain] is missing in eq
[x] command [dfr select] with parameter [rows] is missing in eq  <--- duplicated with get
[x] command [dfr select] with parameter [rest] is missing in eq   <--- duplicated with get
[x] command [dfr unique] with parameter [period] is missing in eq <--- parameter doesnt exit
[x] command [dfr show] with parameter [tail] is missing in eq  <--- changed to to-nu
[x] command [dfr show] with parameter [n_rows] is missing in eq <--- changed to to-nu
[x] command [dfr where] with parameter [condition] is missing in eq <--- better logic with masks (redundant)
[x] command [date format] with parameter [table] is missing in eq
[x] command [date humanize] with parameter [table] is missing in eq
[ ] command [default] with parameter [column name] is missing in eq
[ ] command [default] with parameter [column value] is missing in eq
[ ] command [detect columns] with parameter [no_headers] is missing in eq
[ ] command [detect columns] with parameter [skip] is missing in eq
[x] command [do] with parameter [ignore-errors] is missing in eq
[ ] command [du] with parameter [path] is missing in eq
[ ] command [du] with parameter [min-size] is missing in eq
[ ] command [du] with parameter [all] is missing in eq
[ ] command [du] with parameter [deref] is missing in eq
[ ] command [du] with parameter [exclude] is missing in eq
[ ] command [du] with parameter [max-depth] is missing in eq
[ ] command [each group] with parameter [group_size] is missing in eq
[ ] command [each group] with parameter [block] is missing in eq
[ ] command [each window] with parameter [window_size] is missing in eq
[ ] command [each window] with parameter [block] is missing in eq
[ ] command [each window] with parameter [stride] is missing in eq
[ ] command [empty?] with parameter [rest] is missing in eq
[ ] command [empty?] with parameter [block] is missing in eq
[ ] command [enter] with parameter [location] is missing in eq
[ ] command [enter] with parameter [encoding] is missing in eq
[x] command [every] with parameter [stride] is missing in eq
[x] command [every] with parameter [skip] is missing in eq
[ ] command [exec] with parameter [command] is missing in eq
[ ] command [exec] with parameter [rest] is missing in eq
[ ] command [exit] with parameter [code] is missing in eq
[ ] command [exit] with parameter [now] is missing in eq
[x] command [fetch] with parameter [URL] is missing in eq
[x] command [fetch] with parameter [raw] is missing in eq
[x] command [fetch] with parameter [user] is missing in eq
[x] command [fetch] with parameter [password] is missing in eq
[ ] command [find] with parameter [rest] is missing in eq
[x] command [for] with parameter [numbered] is missing in eq
[ ] command [format filesize] with parameter [field] is missing in eq
[ ] command [format filesize] with parameter [format value] is missing in eq
[ ] command [from sqlite] with parameter [tables] is missing in eq
[x] command [from tsv] with parameter [noheaders] is missing in eq
[x] command [from xlsx] with parameter [noheaders] is missing in eq
[ ] command [g] with parameter [index] is missing in eq
[ ] command [get] with parameter [rest] is missing in eq
[ ] command [group-by] with parameter [grouper] is missing in eq
[ ] command [group-by date] with parameter [column_name] is missing in eq
[ ] command [group-by date] with parameter [format] is missing in eq
[ ] command [hash] with parameter [rest] is missing in eq
[ ] command [hash base64] with parameter [rest] is missing in eq
[ ] command [hash base64] with parameter [decode] is missing in eq
[ ] command [hash base64] with parameter [character_set] is missing in eq
[ ] command [hash base64] with parameter [encode] is missing in eq
[ ] command [histogram] with parameter [rest] is missing in eq
[ ] command [histogram] with parameter [use] is missing in eq
[x] command [history] with parameter [clear] is missing in eq
[ ] command [inc] with parameter [rest] is missing in eq
[ ] command [insert] with parameter [column] is missing in eq
[ ] command [insert] with parameter [value] is missing in eq
[ ] command [into column-path] with parameter [rest] is missing in eq
[x] command [keep] with parameter [rows] is missing in eq
[x] command [length] with parameter [column] is missing in eq
[x] command [let] with parameter [name] is missing in eq
[ ] command [load-env] with parameter [environ] is missing in eq
[x] command [ls] with parameter [path] is missing in eq
[ ] command [ls] with parameter [du] is missing in eq
[x] command [ls] with parameter [all] is missing in eq
[x] command [ls] with parameter [long] is missing in eq
[x] command [ls] with parameter [short-names] is missing in eq
[ ] command [match] with parameter [member] is missing in eq
[ ] command [match] with parameter [regex] is missing in eq
[ ] command [match] with parameter [invert] is missing in eq
[ ] command [match] with parameter [insensitive] is missing in eq
[ ] command [match] with parameter [multiline] is missing in eq
[ ] command [match] with parameter [dotall] is missing in eq
[ ] command [merge] with parameter [block] is missing in eq
[ ] command [move] with parameter [rest] is missing in eq
[ ] command [move] with parameter [before] is missing in eq
[ ] command [move] with parameter [after] is missing in eq
[ ] command [nu plugin] with parameter [load] is missing in eq
[x] command [open] with parameter [path] is missing in eq
[x] command [open] with parameter [encoding] is missing in eq <-- moved to decode command
[x] command [open] with parameter [raw] is missing in eq
[ ] command [pivot] with parameter [rest] is missing in eq
[ ] command [pivot] with parameter [ignore-titles] is missing in eq
[ ] command [pivot] with parameter [header-row] is missing in eq
[ ] command [post] with parameter [path] is missing in eq
[ ] command [post] with parameter [body] is missing in eq
[ ] command [post] with parameter [raw] is missing in eq
[ ] command [post] with parameter [user] is missing in eq
[ ] command [post] with parameter [password] is missing in eq
[ ] command [post] with parameter [content-type] is missing in eq
[ ] command [post] with parameter [content-length] is missing in eq
[ ] command [query json] with parameter [query] is missing in eq
[ ] command [reduce] with parameter [block] is missing in eq
[ ] command [reduce] with parameter [numbered] is missing in eq
[ ] command [reduce] with parameter [fold] is missing in eq
[ ] command [rename] with parameter [column_name] is missing in eq
[ ] command [rename] with parameter [rest] is missing in eq
[ ] command [roll] with parameter [by] is missing in eq
[ ] command [roll column] with parameter [by] is missing in eq
[ ] command [roll column] with parameter [cells-only] is missing in eq
[ ] command [roll column] with parameter [opposite] is missing in eq
[ ] command [roll up] with parameter [by] is missing in eq
[ ] command [rotate] with parameter [rest] is missing in eq
[ ] command [rotate counter-clockwise] with parameter [rest] is missing in eq
[ ] command [s3] with parameter [RESOURCE] is missing in eq
[ ] command [s3] with parameter [raw] is missing in eq
[ ] command [s3] with parameter [endpoint] is missing in eq
[ ] command [s3] with parameter [access_key] is missing in eq
[ ] command [s3] with parameter [secret_key] is missing in eq
[ ] command [s3] with parameter [region] is missing in eq
[ ] command [save] with parameter [path] is missing in eq
[ ] command [save] with parameter [append] is missing in eq
[ ] command [save] with parameter [raw] is missing in eq
[ ] command [selector] with parameter [inspect] is missing in eq
[ ] command [selector] with parameter [query] is missing in eq
[ ] command [selector] with parameter [as_html] is missing in eq
[ ] command [selector] with parameter [attribute] is missing in eq
[ ] command [selector] with parameter [as_table] is missing in eq
[ ] command [seq] with parameter [rest] is missing in eq
[ ] command [seq] with parameter [widths] is missing in eq
[ ] command [seq] with parameter [separator] is missing in eq
[ ] command [seq] with parameter [terminator] is missing in eq
[ ] command [seq date] with parameter [reverse] is missing in eq
[ ] command [seq date] with parameter [separator] is missing in eq
[ ] command [seq date] with parameter [output-format] is missing in eq
[ ] command [seq date] with parameter [input-format] is missing in eq
[ ] command [seq date] with parameter [begin-date] is missing in eq
[ ] command [seq date] with parameter [end-date] is missing in eq
[ ] command [seq date] with parameter [increment] is missing in eq
[ ] command [seq date] with parameter [days] is missing in eq
[ ] command [sort-by] with parameter [rest] is missing in eq
[ ] command [sort-by] with parameter [reverse] is missing in eq
[ ] command [sort-by] with parameter [insensitive] is missing in eq
[ ] command [split-by] with parameter [column_name] is missing in eq
[ ] command [start] with parameter [rest] is missing in eq
[ ] command [start] with parameter [application] is missing in eq
[ ] command [str] with parameter [rest] is missing in eq
[x] command [table] with parameter [start_number] is missing in eq
[ ] command [term size] with parameter [tall] is missing in eq
[ ] command [term size] with parameter [wide] is missing in eq
[x] command [to json] with parameter [pretty] is missing in eq <-- it is pretty by default now - non-pretty use json -r
[ ] command [tutor] with parameter [search] is missing in eq
[ ] command [tutor] with parameter [find] is missing in eq
[ ] command [unalias] with parameter [name] is missing in eq
[ ] command [update cells] with parameter [block] is missing in eq
[ ] command [update cells] with parameter [columns] is missing in eq
[ ] command [which] with parameter [application] is missing in eq
[ ] command [which] with parameter [rest] is missing in eq
[ ] command [which] with parameter [all] is missing in eq
[ ] command [xpath] with parameter [query] is missing in eq
[ ] command [zip] with parameter [block] is missing in eq

Porting WholeStreamCommand (nushell) to Command (engine-q)
All commands have the standard boilerplate methods including

name
usage
signature
run

Name and usage is fairly obvious
Signature
The signature can have required parameters, optional parameters, or no parameters.  An example of a command with no parameters is the
command length.
  fn signature(&self) -> nu_protocol::Signature {
      Signature::build("length").category(Category::Filters)
 }

Please be sure and add in the Category of the command you are porting so that our documentation and filtering system picks it up
Commands with optional and required parts should work similarly between Nushell and Engine-q.
Run
Nushell:
fn run(&self, args: CommandArgs) -> Result<OutputStream, ShellError> { ... }

Engine-q:
    fn run(
        &self,
        engine_state: &EngineState,
        stack: &mut Stack,
        call: &Call,
        input: PipelineData,
    ) -> Result<nu_protocol::PipelineData, nu_protocol::ShellError> {

Run is where all of the action happens when porting over a command from nushell or writing a new command. You'll notice that Engine-q uses a much more expanded form of the arguments when compared to Nushell's more compact form. This allows for clear access to the components of running a command:

the state of the declarations known to the engines (EngineState)
the stack of values known at eval time (Stack)
the call to the command itself (including its flags and arguments)
the input to that command (the value being piped into it).

EngineState
The EngineState gives access to the global state of the engine, which currently is mostly the declarations that need to be known in order to run any code in the system.
Stack
The stack is a snapshot of the values that the current block can see. This Stack is narrowed using closure capture to only the variables the block can see.
Call
pub struct Call {
    /// identifier of the declaration to call
    pub decl_id: DeclId,
    pub head: Span,
    pub positional: Vec<Expression>,
    pub named: Vec<(String, Option<Expression>)>,
}

The call represents the call itself, including:

the unique identifier for what declaration this call will invoke (the decl_id)
the location of this call in the source code (the head)
the positional arguments (positional)
the named or flag arguments (named)

Rather than reaching into this structure directly, it's often better to access the contents of this call via the helper methods that can evaluate the unevaluated arguments for you:
// Example of getting a single required positional argument as a string with an associated span
let separator: Spanned<String> = call.req(context, 0)?;

The type of the variable allows call.req(...)? to invoke the right converter for you, failing with a type mismatch error if the caller has passed the wrong type at runtime. We use the same technique in Nushell, so this should port similarly with the change of having context as a new argument to the helper methods.
PipelineData
In Nushell, input and output were handled as streams. Commands often just applied themselves as calls onto these streams. The stream concept was helpful to get going, but also shows its limitations. For example, how do you represent a single value in the stream? What's the difference between a single item list and a single item?  When should we take a list and flatten it into the stream? Ambiguities like this were fairly common in practice with implementing Nushell commands.
With Engine-q, we separate the various data types into specific cases. Single value outputs are now just a single value case of Value. Streams are handled separately from Value, and both form a PipelineData enum. This works for both input and output to commands.
To port from Nushell to Engine-q, for commands that call .map or .flat_map on the input stream, we've implemented helpers on Value that you can call with the same name. You can also call into_iter to get a full iterator. Additionalyl, you can also match on PipelineData yourself and handle the different cases.
Adding your commands
Add your newly ported commands to the crates/nu-command/src/default_context.rs file that is in the nu-command subcrate. There, you'll see a list of the commands that will be loaded in the default context. Adding your command here will make it visible when you start up Nu.
Tests and subcommands
If you add a new top-level command with subcommands, you'll need to add the top-level command to the group of default commands in the test context. You'll find this list in the crates/nu-command/src/example_test.rs file.
References
Core Engine-q data structures
From 12/13/2021 Discord
JT Note on Most important commands still needed to be ported

I can do all the math commands no problem

I'd love to work on all the date commands!

@vitvakatu - engine-q config works a bit differently than Nushell, but you might be able to still port much of the functionality. Rather than using a toml file, engine-q uses a nushell script that runs in startup.
@onthebridgetonowhere - sounds good!

Could I have a go at first as well? Thanks!

@onthebridgetonowhere - it's yours

May I try and port echo and format?

@aslynatilla - they're yours. echo should be simpler in e-q than it was in Nushell as each does all the iteration now. You should just be able to send on the PipelineData you get

@jntrnr yep, I've noticed this after I decided to work on config :) I think I will be able to port it anyway. Thank you!

Could I also have into string from conversions? Thanks!

Hi, please sign me up for the path commands, if possible. :)

@onthebridgetonowhere - yup! it's yours
@LiHRaM - definitely. they're yours

Working on a few str cases:

camel-case
kebab-case
pascal-case
screaming-snake-case
snake-case

Can i be assigned the from yaml command?

@luccasmmg - yup, it's yours!

Worked on the str capitalize command #317

@jntrnr - I am planning to do all the str commands, but it will take me like a week or so (a bit every day). Unless, someone else wants to work on them and is faster :-)
We can also mark into string as done, you added the cell path support to it.

@onthebridgetonowhere - cool I'll mark those.

@onthebridgetonowhere Could you implement the str to-datetime and str to-decimal as into datetime and into decimal? I think they should be there and not in the str group.

@kubouch let's do that. And would it keep its original purpose of converting strings only into datetime/decimal?

@onthebridgetonowhere I think so. We have into X commands for other types as well. We might want to modify into decimal to accept also integers, not only strings, but that should be easy to do.

Can i be assigned from url and from eml?

@luccasmmg yup they're yours

@CBenoit - it's yours

@kubouch @onthebridgetonowhere related to the into commands, there is into int and str to-int and they have similar but different functionality. I'd like to see all of str to-int's functionality brought into into int if possible. Thoughts?

@fdncred +1 definitely. I overlooked str to-int.

@fdncred @kubouch we can do that! Thanks for the suggestion.

@vitvakatu - I ended up taking a look at the config from the engine side and put some basic together for a config variable: https://github.com/nushell/engine-q/pull/332
I haven't merged it yet if you want to take a look.
I haven't ported any of the config files and would be happy to chat about designs and how this works with your work.

@jntrnr thank you for ping, I'll contact you in a few days if face some real problems. After a brief look, I think it won't notably affect my code

parse (category strings) command done porting in https://github.com/nushell/engine-q/pull/338
Next I’ll port hash command + subcommands.

Can I be assigned the rest of the "from" commands?

@luccasmmg - yup!

Could I contribute to random commands? 😸

@jaeheonji    great ! you are all signed up for the random commands...  as you finish the commands reference this issue and we will mark them as done...  We appreciate you helping us out, many thanks....

Hello, can I please be assigned to

all?
any?
find
keep until
keep while
skip
skip until
skip while
sort-by

@arthur-targaryen you are all set and signed up for your requested commands... Thank you so much for helping out with our engine-q porting of nushell commands !

@stormasm hi, I'm afraid I can't find time to port config commands in the nearest future, so please make these commands available for others. It's really cool to see so much activity on this task!

@vitvakatu thanks for the heads up ! I removed your name from the config commands...  Of course we welcome your participation in the future when you get more free time...

Our preference when sending us a Pull Request (PR) is to do one command at a time.

Ok, I understand! I will split my PR into smaller ones.

Since i'm almost finished with the from(only two left) commands, can i be assigned all the to as well?

@luccasmmg - yup!

Hi, I can take /platform, i.e. clear, clip, du, exec, kill, paste, pwd, sleep and which.

@Scorpil sounds good, I'll add you

Phew, finished all the str commands. I can do cal and pathvar next.

@onthebridgetonowhere Great job, thanks a lot! Maybe you can skip the pathvar, I had some ideas how we could get away without it.

Sounds good! Will port cal then, I remember I worked on it in the original nushell.

Working on uniq :)

Hi! There seems to be a lot of porting going on! Could I contribute the url (host, path, qury, schema) command?

@onthebridgetonowhere you are signed up for uniq, thanks !

@jaeheonji Thank you !  I signed you up for the url commands...

@stormasm thanks. we can mark it done now (pending merging).
I can try version next, looks fun :)

@onthebridgetonowhere thank you for doing uniq... Much appreciated...

About hash base64, I feel like it belongs to the str family instead of the hash one because it's not "hashing" but "binary-to-text" encoding. What about a str base64 command instead? Or something else?

@CBenoit my vote is to leave it the same to avoid any breaking changes for now.

Fair point!

@jaeheonji Thanks for porting the url commands !  I marked all of them as done.  Just confirming that is correct by my quick review of your landed PR.

@stormasm Thank you :) And, while porting the network command, I found out that there are post and fetch commands. It looks like I'll be contributing to this as well.  Could you assign it to me 😄 ?

btw to toml and to url are already done, even in the list they aren't.

updated! thanks @luccasmmg

Can we also mark str trim as done? Thanks. I'll work on empty? and flatten next.

@onthebridgetonowhere you are now signed up for empty and flatten, and str trim is now marked as done...  Great effort on all of these commands, thank you again...

anyone interested in doing the char command and ansi command?

I am happy to take a crack at char and ansi - might take a few days?

go for it @matthewauld. we'll mark you down for them.

OK, I will start there!

Maybe a bit late but I just noticed a huge number of Span::unknown() used in the commands code. In general, it should be used only when absolutely necessary and close to never.  What a Span does is that it sets the coordinates for arrows in error messages. Span::unknown() sets it to zero which basically makes any error message involving that span unusable.
To illustrate, the $in value on the screenshot was likely set somewhere with Span::unknown() which makes the arrow point at the beginning of the first thing that Nushell happened to parse, instead of the proper location:

When working on commands, you can use call.head (this is a good option for new values created within the command) or reuse spans that come with Values from the input stream or command arguments. To get it right requires a bit of playing around so a good idea is to also purposefully trigger the errors and see how the messages look like.
Thanks for understanding!

I can do compact and default if no one else wants them?

@matthewauld thank you for all of your effort...  You are now signed up for compact and default...  Enjoy !

No problem! Really like nushell, figure this is a good way to learn the internals!

I'm working on porting fetch :-)

@onthebridgetonowhere - nice! if you haven't looked yet, you should be able to use some of the logic from the new open command

@onthebridgetonowhere - nice! if you haven't looked yet, you should be able to use some of the logic from the new open command

Great suggestion, thanks JT.

sure @Pantonshire, have at it.

looking for seq, seq-date, and shells for some scripts. any takers?

@fdncred - I'm signed up for shells since it needs some of the environment work. But folks should definitely feel free to take seq and seq-date

A can do reduce. I need it for my script haha :grinning:

@kubouch it's yours

I am thinking I'll give chart a try :-)

@onthebridgetonowhere - it's yours

I am thinking I'll give chart a try :-)

Currently, chart works like a histogram. I'd personally like to see it decoupled: you'll give it x,y data points and it will display them, nothing more. We have the histogram command in Nushell to compute histograms so if you want to display a histogram, you'd just pipe it to chart. Having a generic chart command for plotting any x,y data would make it more useful and versatile, IMO, and might be also easier to implement.
Maybe @andrasio might have some comments :-) .

I'm trying to port seq.

thanks @nibon7 it's yours.

I am thinking I'll give chart a try :-)

Currently, chart works like a histogram. I'd personally like to see it decoupled: you'll give it x,y data points and it will display them, nothing more. We have the histogram command in Nushell to compute histograms so if you want to display a histogram, you'd just pipe it to chart. Having a generic chart command for plotting any x,y data would make it more useful and versatile, IMO, and might be also easier to implement.
Maybe @andrasio might have some comments :-) .

We can do that, sure! I will @ you once there's a PR with the changes.

I am unable to work on the chart command at the moment, so if anyone else wants to have a go at it, please go ahead!

I am unable to work on the chart command at the moment, so if anyone else wants to have a go at it, please go ahead!

Thanks @onthebridgetonowhere - i'll unmark you. we sure appreciate all your contributions!

Closing this in favour of: https://github.com/nushell/engine-q/issues/735


jax.numpy.linalg.inv causes segfault on macOS

maybe related to #432.
example code
import jax.numpy as np

N = 80
np.linalg.inv(np.eye(N))

output:
/path/to/project/.venv/lib/python3.7/site-packages/jax/lib/xla_bridge.py:120: UserWarning: No GPU/TPU found, falling back to CPU.
  warnings.warn('No GPU/TPU found, falling back to CPU.')
zsh: bus error  python -m misc.jax

If N is smaller than 80, it works correctly on my machine.
my environment
macOS 10.14.6
Python 3.7.0 (pyenv)
jax 0.1.55
jaxlib 0.1.37
numpy 1.17.4
scipy 1.3.3

I'm pretty sure this is a duplicate of https://github.com/google/jax/issues/432
The workaround is to downgrade your scipy release to 1.1.0, but I admit that's not a great answer.


Configuration and reflection

Sail needs to know what its hostname is in order to properly validate paths (environment variable? toml config?), and needs a list of hostnames that it knows how to forward to to support 251 and 551 commands. The second of those isn't necessary since we can just return errors for anything not on the same host, though.

we should also include our hostname in HELO and other command responses

I'd like to be able to accept mail for more than one domain. OpenSMTPD seems to handle the "which domain do I present" issue, when handling multiple domains, by leaving it entirely up to the host to configure.
To set the hostname that smtpd presents itself as over smtp, you put the name in /etc/smtpd/mailname, otherwise it seems to check your /etc/hosts for what maps to <IP_ADDRESS>.


Host the builded game somewhere

Could you make a release here on github..? So that it would be possible to include the game in any website just by adding a script tag pointing to the release here on github ;-) We would love to integrate it on our internal bootup-page of our frontend-project :D

I... don't really see the point of that, sorry. If you really want to do that, you can load the game from my website: https://phoboslab.org/q1k3/
Otherwise just fork this repo :)

Github Pages
Steps:

git checkout --orphan gh-pages
git rm -rf --dry-run .   # preview files to be deleted
git rm -rf .                    # actually delete the files

Now you can start adding files and commit them and they will live in their own branch.
Ex: https://sibvrv.github.io/Q1K3Mod/


transpile directory.js before npm publish

I'm pulling the stellarterm-directory package into steexp now which is really nice. i've changed the anchors list view to build off of it including the logos etc.
however when i webpack up everything it fails due to ES5(6?) code inside the directory package main script directory.js. this code should be transpiled before being published into npm. or alternatively the directory.json could be made the package main.

Oh, the directory.json is supposed to be checked in. And also, the directoryBuilder.js works in Node.js v8 natively.
Try updating your Node.js to the latest version 8. I'm not going to support v6 since v8 has long term support (in a few days).

Maybe try again using node version manager. And if it still doesn't work, i'll take a look again. But I'm pretty sure you should just use a newer version of nodejs

the problem is not the node version but my toolchain, specifically create-react-app invoking minify.  it assumes the javascript in all the npm dependencies it's minifying has been precompiled to es5. which is not the case for the directory.
I found they write about this in create-react-app docs : https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify
but actually I read what you wrote under "manually using the JSON" and really all I need is that directory.json. so, I reckon I'll just pull that it in manually and that'll do it.
btw. this is the build error from react : https://travis-ci.org/chatch/stellarexplorer/jobs/290854404#L490

Oh i see the issue now. I used ES6 class. Thanks!

https://github.com/irisli/stellarterm/commit/bad47bfe968bbdc4d11b7259050e58c83ccd295c
I fixed it here hopefully. Try again and let me know how it goes please


Bump debian version

Description
Bump debian package version.
Is there a reason why this version is hardcoded?
Issues Resolved
        ================================================================================
        Error executing action `install` on resource 'apt_package[mysql-client-5.5]'
        ================================================================================

        Mixlib::ShellOut::ShellCommandFailed
        ------------------------------------
        Expected process to exit with [0], but received '100'
        ---- Begin output of apt-get -q -y install mysql-client-5.5=5.5.49-0+deb8u1 ----
        STDOUT: Reading package lists...
        Building dependency tree...
        Reading state information...
        The following packages will be REMOVED:
          mysql-server-5.5
        The following packages will be DOWNGRADED:
          mysql-client-5.5
        0 upgraded, 0 newly installed, 1 downgraded, 1 to remove and 0 not upgraded.
        Need to get 0 B/1667 kB of archives.
        After this operation, 32.4 MB disk space will be freed.
        STDERR: E: There are problems and -y was used without --force-yes
        ---- End output of apt-get -q -y install mysql-client-5.5=5.5.49-0+deb8u1 ----
        Ran apt-get -q -y install mysql-client-5.5=5.5.49-0+deb8u1 returned 100

Check List

[ ] All tests pass. See https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/TESTING.MD
[ ] New functionality includes testing.
[ ] New functionality has been documented in the README if applicable
[ ] The CLA has been signed. See https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD

@jenssegers Can you take a look at the specs here


The issues about privacy of different users' shared folder

My actions before raising this issue

[X] Read/searched the docs
[X] Searched past issues

Excuse me @bsekachev
I've been mounted shared folder to CVAT successfully. However. I found that the data I've mounted to CVAT can be seen by different users. It's very dangerous for my data has high probability to be used by another users.
How should I do to make the shared folder be visible only to specific accounts ?

Shared folder is dedicated to other user see its content. We do not have configuration that strict it.
If you want privacy for your data, your choice is cloud storages.
On your self-hosted instance you can try to setup corresponding access rules in this file:  cvat/apps/iam/rules/server.rego. For example, now each user who has at least WORKER role may access it.
https://opencv.github.io/cvat/docs/administration/advanced/iam_system_roles/
https://www.cvat.ai/post/cvat-open-policy-agent

Shared folder is dedicated to other user see its content. We do not have configuration that strict it. If you want privacy for your data, your choice is cloud storages.
On your self-hosted instance you can try to setup corresponding access rules in this file: cvat/apps/iam/rules/server.rego. For example, now each user who has at least WORKER role may access it.
https://opencv.github.io/cvat/docs/administration/advanced/iam_system_roles/ https://www.cvat.ai/post/cvat-open-policy-agent

Excuse me @bsekachev
Do the data in the shared folder and the names of models in AI tools can still be seen by other users even I setup those access rules ?

data in the shared folder

You can setup access the way, other users can not see it. It totally depends on your wish.
But it will be a custom modification.

names of models in AI tools

That is a different questions, need to work with other rules in the same directory.

server.rego

Could you provide me an example ?


Missing import table model in generated models

I have a package structure like following:

db

group1

Model1EntrySpec

group2

Model2EntrySpec

viewmodels

MyViewModelSpec

If I now do something like following in Model1EntrySpec
@ModelMethod
public static void function(Model1 item, Model2 model2) {
    // ...
}

I see, that the generated Model1 class is missing the import ....db.group2.Model2... The same happens in similar use cases, when using Model1 or Model2 in the MyView class...
I'm using the latest version 3.1.2...

Yeah, this is a known annoyance of using annotation processing for code generation. When referring to classes that don't exist yet, the APT tool chain represents them as an ErrorType, which has no package information, so it's impossible to generate an import statement from an unqualified class name. This isn't much of a problem for things needed only at runtime -- for example, it's safe to refer to the properties of classes that haven't yet been generated when constructing the query for a view -- but it's a problem when the classes are needed at compile time, like in the method signature of your example model spec.
A workaround is to declare the method using the fully qualified class name of the generated class:
@ModelMethod
public static void function(Model1 item, com.yourpackage.db.group2.Model2 model2) {
    // ...
}

Isn't it possible to use the imports from the the model spec class? Anways, I could have thought about using fully qualified class names myself. This solves the problem of course

To answer your question about using the imports from the model spec class: sadly it is not really possible. The annotation processing API doesn't give you access to the import statements themselves in the source file, and for some reason it doesn't use those imports to resolve any information about those ErrorTypes it provides. So even if you have import com.yourpackage.db.group2.Model2, if Model2 doesn't exist yet it still only represents the Model2 param in the method as an ErrorType with name Model2, no package info.
The only way to get them would be to somehow figure out where the source file is located and manually parse it for import statements, which, while probably technically possible, is an ugly hack that I'm not super eager to integrate into SquiDB as an officially supported thing. Might be possible to hack together with a code generation plugin though, so if this becomes a major burden that people are dealing with it we might revisit solutions then.

Would it be possible to annotate my own imports easily? It's now that important though, but makes the class look a little bit better...
But the fully qualified name is working as well and it's not a big problem, if you know it

Sure, you could easily define a code generation plugin to look for something like an @Import(classNames={...} annotation and then add those imports to the generated class using the addRequiredImports() plugin method.


Revert "Remove additional implementation for AnyObjects"

This reverts commit ff8675d790e0828c601a26b2e35f569ece49efa9.
Discussion: #25

Beautiful implementation! Thanks a lot.


Evaluate json-schema-codegen for JSON Schema -> Scala case classes

https://github.com/VoxSupplyChain/json-schema-codegen

Pretty cool to be honest. Especially with SBT-plugin. No macro/type-providers magic though (not sure is it bad or good).


Filter code inspection/syntax check

In case of generated maintenance screens, the code inspection/syntax check include findings in SAP code (LSVIM* includes):

This change suppresses those findings.

this is basically a problem with code inspector, and it should ideally be fixed there, but since its SAP code, we cannot really do it, and this is a small and easy change
merging


maybe regression introduced by v3.6.1

Describe the bug
After updated to v3.6.1, I found some d.ts files or js files were missing but is ok with v3.6.0 even when v3.6.0 moduleResolution has been set.
升级到3.6.1后发现有些d.ts文件或js文件未生成, 但3.6.0正常, 手动设置moduleResolution时也能输出d.ts
v3.6.1版本
https://stackblitz.com/edit/vitejs-vite-x9dszy?file=packages%2Ftypes%2Fdist%2Findex.d.ts
v3.6.0版本
https://stackblitz.com/edit/vitejs-vite-skadh5?file=internal%2Fbuild%2Fpackage.json
Reproduction
https://stackblitz.com/edit/vitejs-vite-x9dszy?file=packages%2Ftypes%2Fdist%2Findex.d.ts
Steps to reproduce
in each project

run pnpm install
cd to internal/build
run pnpm build
see packages/types/dist/

System Info
System:
    OS: macOS 13.0.1
    CPU: (8) arm64 Apple M1
    Memory: 64.09 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.17.1 - ~/.nvm/versions/node/v18.17.1/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 9.6.7 - ~/.nvm/versions/node/v18.17.1/bin/npm
    pnpm: 8.3.0 - ~/Library/pnpm/pnpm
  Browsers:
    Safari: 16.1
  npmPackages:
    @vitejs/plugin-vue2: ^2.2.0 => 2.2.0
    @vitejs/plugin-vue2-jsx: ^1.1.0 => 1.1.0
    vite: ^4.4.9 => 4.4.11
    vite-plugin-dts: ^3.6.1 => 3.6.1

Validations

[X] Read the FAQ.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] The provided reproduction is a minimal reproducible example of the bug.

谢谢反馈。
不过希望以后能提供一个更小的复现（当前包含很多与 issue 无关的其他依赖），可以有效提高定位和修复的效率，同时减轻大家的负担 😂。


question about speller

Hi Vincent,
First, this is a great framework. I have a question about the speller code (speller.py). I do suppose you implemented speller of LAS architecture here. As I know the current time step decoder state (s_t) computation in the speller take attention output c_t, previous time step's decoder state s_t-1, and also the previous time step's speller output y_t-1(follow symbol in original LAS paper) But actually I did not see y_t-1 contribute to s_t computation. Am I missing something here?
by the way, attached the snapshot of part of LAS paper related to this question.
look forward to your feedback, many thanks!
harry

Hi Harry,
To see how the previous time step is used is not very straightforward. You need to look into rnn_decoder.py. The inputs are put into the helper (line 59), which is used in the decoder (line 67) which is the used in the dynamic decode function (line 74).
The helper uses scheduled sampling during training. It will use the correct target as input to the rnn cell in most cases, but with some probability it will use the actual output of the rnn cell to make it more robust against its own errors during decoding.
The contains the functionality that has to be done at each time step and finally the dynamic_decode function will actually create the while loop do use the decoder at every timestep.

really appreciate the super quick reply. I will take a close look at the parts you mentioned. Thank you so much!


Components and Utils import alias issues

Import alias for components and utils not work properly instead they create folders with that name aliases after doing shadcn init command for configuration.
I used react vite typescript project

you can try manually moving the files to the appropriate folders

you can try manually moving the files to the appropriate folders and delete the unused created folders
also, check your path alias & base url in tsconfig if they're set properly

Yes there were some config issues in vite.config file thankyou for support

interesting, it should work properly just by setting up path aliases in tsconfig/jsconfig.

No in order to use import aliases in vite react ts project we need to set aliases for both in tsconfig.json and vite.connfig.json, otherwise aliases paths are not resolved properly at build time

oh okay, noted

you can update your tsconfig.json like this
{
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
"baseUrl": ".",
"paths": {
"@/": ["./src/"]
},
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true

},
"include": ["src"]
}


[Issue] Existing bicep files are not respected

[x] Make sure you've installed the latest version using instructions in the wiki 👉 I've got the nightly build version

Output from azd version
azd version 1.6.0-beta.1-daily.3273852 (commit f00f37d70ae38a8b53d28650b0398ea4d097ec7d)

Describe the bug
👉 It's related to Aspire. 👈
I've got an existing Azure Bicep file, aoai.bicep, under the infra directory, which provisions Azure OpenAI instances. When I ran azd up under this condition, it threw an error like the screenshot below.

If I remove the infra directory, azd up works just fine.
To Reproduce

Create an Aspire starter project
Create any Bicep file under the infra directory and give it a name other than main.bicep
Run azd up
See the error like above.

Expected behavior
azd up should work fine.
Environment
Information on your environment:
* Language name and version: .NET 8
* IDE and version : Visual Studio 2022 17.9
Additional context

Haven't tried yet. But my gut feeling says, even if I only have the infra directory with nothing in it, it might be throwing the same error.

@justinyoo , as of today, azd does not support Aspire-Auto-infra-generation + infra-folder
As soon as you create the infra folder , azd will switch to use the content of that folder as the source of true for the infrastructure.  Then, azd will find for the main.bicep file by default. If you want to use a different name, you need to define the name in azure.yaml like:
# define `foo` as the default bicep file, instead of `main`
infra:
  module: foo

This will tell azd to take foo.bicep as the iac.
You might want to consider running command azd infra synth . This command would take all the infrastructure required by the Aspire project and put within the infra folder.  Then you can add more resources there.  Just remember that, if you make changes to the Aspire host (like adding more projects or components there), you need to run azd infra synth again.

@vhvb1989 Thanks for the reply!
Yeah, that's what I'm talking about. I think more proper logic, in order to respect existing bicep files under the infra directory, could be:

Check whether the infra directory exists or not

If infra doesn't exist, provision resources generated by Aspire
If it exists, look for main.bicep as defined in azure.yaml

If main.bicep doesn't exist, provision resources generated by Aspire
If it exists, throw an error or prompt asking like "main.bicep will be overwritten. Want to continue?"

The main point of my question is that, regardless main.bicep exists or not, azd up throws an error, as long as the infra directory exists. I don't think it's a proper behaviour because there are chances provisioning other resources not associated with Aspire like Azure OpenAI, Azure Functions, Azure Event Grid, etc.

Seems to be a bigger feature under discussion here to make azd work in hybrid/mixed mode i.e., Aspire's in-memory IaC + non-Aspire projects IaC.
@vhvb1989 is planning to have a temporary fix in place to make them work independently.

Not a blocker for the December release. Moving to January release.


Require Material-UI v5 alpha

Getting an overview...

We might want to update
https://github.com/mui-org/material-ui-pickers/blob/ff3368340301d8e16b9b42781b6d02487ca07fc0/lib/package.json#L3
to
5.0.0-alpha.11

I wouldn't skip a version. That is always confusing.

Ok, fair enough

Released as v4.0.0-alpha.11


replace NHDHR source with aws

@SimonTopp ran into this.
Need to update this to this

Just quick update on this. I poked around a little this week, I think the actual correct path is
https://prd-tnm.s3.amazonaws.com/StagedProducts/Hydrography/NHD/State/GDB/NHD_H_%s_State_GDB.zip.  Re-running on personal drive cache this weekend and will compare to make sure lakes match up.

Addressed in #9


Api version beta : Multiple web services with the name ProdBomHeader have been found.

Hi,
i'm using Item page with a part of ProdBomHedaer and inside the page ProdBomHeader i'm using a part of ProdBomLines.
using method get on postman i have this error!
"error": {
"code": "Unknown",
"message": "Multiple web services with the name ProdBomHeader have been found.  Update your web service names to be unique and try again."
}
}
page 50062 "ZA PostComponents"
{
PageType = API;
Caption = 'postComponents', Locked = true;
APIPublisher = 'ZA';
APIGroup = 'ZA';
APIVersion = 'beta';
EntityName = 'postComponent';
EntitySetName = 'postComponents';
SourceTable = Item;
DelayedInsert = true;
ODataKeyFields = Id;
part :
part(ProdBomHeaders; "ZA Prod.Bom Header")
{
ApplicationArea = All;
Caption = 'Header';
EntityName = 'ProdBomHeader';
EntitySetName = 'ProdBomHeaders';
SubPageLink = "No." = FIELD("Production BOM No.");
            }

ProdBom Hedaer page:
page 50064 "ZA Prod.Bom Header"
{
PageType = API;
Caption = 'ProdBomHeader', Locked = true;
APIPublisher = 'ZA';
APIGroup = 'ZA';
APIVersion = 'beta';
EntityName = 'ProdBomHeader';
EntitySetName = 'ProdBomHeaders';
SourceTable = "Production BOM Header";
DelayedInsert = true;
ODataKeyFields = "No.";
part:
part(ProdBomLines; "ZAProd.Bom Line2")
{
ApplicationArea = All;
Caption = 'Lines';
EntityName = 'ProdBomLine';
EntitySetName = 'ProdBomLines';
SubPageLink = "Production BOM No." = FIELD("No.");
}
Thanks.

Let's get the issue to a team who will fix and backport it, as this repository is only for issues related to the AL compiler in latest developer preview environment for Dynamics 365 Business Central. We suggest that you open a support case or file a bug in Collaborate, to ensure that all Business Central users benefit from your catch as soon as possible.
To open a support case, you can:

Open a support request to CSS through the PartnerSource portal

Contact your Service Account Manager (SAM) in your local subsidiary to understand what is included in your contract as of support incident and PAH (Partner Advisory Hours). Your SAM might also direct you "step by step" how to open a support request or how to get credentials, if this is the first time for you or your company

If you file the bug in Collaborate, remember to include steps to reproduce the issue, and the Business Central build number and country version you're using.


localized strings

localized strings in appadmin module

Debug doesn't need to be i18n.
Keeping the semi-colon outside the T() is deliberate so as to reduce the amount of duplicate work for the translators