Suggestion: Return a discriminable object instead of a tuple array

Taking inspiration from the until package and this Twitter discussion:

Why does until return an object and not an array?
The until function used to return an array of shape [error, data] prior to 2.0.0. That has been changed, however, to get proper type-safety using discriminated union type.
Compare these two examples:
const [error, data] = await until(() => action())

if (error) {
  return null
}

// Data still has ambiguous "DataType | null" type here
// even after you've checked and handled the "error" above.
console.log(data)

const result = await until(() => action())

// At this point, "data" is ambiguous "DataType | null"
// which is correct, as you haven't checked nor handled the "error".

if (result.error) {
  return null
}

// Data is strict "DataType" since you've handled the "error" above.
console.log(result.data)

for usage in TypeScript, an object is the only nice way to be able to narrow the type.
You can of course do something like this:
const result = await until(() => action())

if (result[0]) { // result[0] is the error
  return null
}

// Here, result[1] (data) still has an ambiguous "DataType | null" type
// even after you've checked and handled the "error" above.
console.log(result[1])

but that's a lot less explicit/prone to error, which can also be said for the destructuring approach in general, as it will be quite easy to forget the correct order for data and error, especially without TypeScript being involved.
In summary, I'm proposing to change the syntax/type to something like this:
// ?= result type resolves to this:
export type Result<
  TError extends any = Error,
  TData extends any = unknown,
> =
  | {
      error: TError;
      data: null;
    }
  | {
      error: null;
      data: TData
    };

async function getData() {
  const requestResult ?= await fetch("https://api.example.com/data");

  if (requestResult.error) {
    handleRequestError(requestResult.error);
    return;
  }

  const jsonResult ?= await requestResult.data.json();

  if (jsonResult.error) {
    handleParseError(jsonResult.error);
    return;
  }

  const validationResult ?= validationSchema.parse(jsonResult.data);

  if (validationResult.error) {
    handleValidationError(validationResult.error);
    return;
  }

  return validationResult.data;
}

for usage in TypeScript, an object is the only nice way to be able to narrow the type.

Typescript type narrowing is not broken with this apporach.
https://github.com/arthurfiorette/tuple-it
The above package I created follows the same code but uses .tuple  instead of [Symbol.result] and is type safe and can be type narrowed.

However moving to an object (with [Symbol.iterable] so it can still be destructured as [error, data]) would allow us to add things easier to its prototype, like .expect(), .or(), .orElse(), .ok(), .err(), .map()... that can be found on Rust's std::Result

I also think that it is better to use an object instead of tuple, more then type narrowing must support types like: Err<unknown> to be able express the exception throwing:
function sqrt(x: number): number {
  if (x < 0) throw new Error('SQRT: expected x to be greater or equal zero, but negative value recieved');
  return Math.sqrt(x);
}

// here we should get unknown error:
const [error, y]: [unknown, number] ?= sqrt(x);

But if we do something like that:
type Ok<T> = {
  [Symbol.result](): { data: T }
}

type Err<E> = {
  [Symbol.result](): { error: E }
}

type Result<E, T> = Err<E> | Ok<T>;

const ok = <T, >(data: T): Ok<T> => ({ [Symbol.result]: () => ({ data }) });
const err = <E, >(error: E): Err<E> => ({ [Symbol.result]: () => ({ error }) });

function sqrt(x: number): Result<'ERR_SQRT_NEGATIVE_VAL', number> {
  if (x < 0) return err('ERR_SQRT_NEGATIVE_VAL');
  return ok(Math.sqrt(x));
}

const [error, y]: ['ERR_SQRT_NEGATIVE_VAL', number] ?= sqrt(x);

What happens if undefined is thrown?
I'm aware that this isn't a normal occurrence and would be stupid to do, but try...catch handles this situation as expected, but as is either of the suggested result types would break down in this technically valid situation.
// try to generate a random number but undefined is thrown.
// value will not be a number even though error is undefined.

function randomNumber() {
  throw undefined
}

const [error, value] ?= randomNumber()
assert(error === undefined)
assert(value === undefined)

const { error, value }  ?= randomNumber()
assert(error === undefined)
assert(value === undefined)

It seems necessary to use a result object with a discriminator value.
Prior art: Promise.allSettled()
// try to generate a random number asynchronously but undefined is thrown.
// use `Promise.allSettled()` to get an "outcome object" for the number.
// the outcome object's status is "rejected", reason is undefined, and value is not set.

async function asyncRandomNumber() {
  throw undefined
}

async function asyncSettle(promise) {
  const [result] = await Promise.allSettled([promise])
  return result
}

const result = await asyncSettle(asyncRandomNumber())
result satisfies { status: "fulfilled", value: T } | { status: "rejected", reason: any }
assertEqual(result, { status: "rejected", reason: undefined })

Note: the object overhead might be more expensive for low-level usage (webGPU, encoding, realtime applications) -- imho its not worth the trade off

Just found out about this proposal, very excited!  I'm also really glad to see others were thinking about future potential for a Result/Maybe/Option type.
I think ?= should return a Result object that coerces to a tuple if the left hand side is destructuring it as an array.  This could be achieved with Symbol.iterator at runtime (example).  For now the Result object would have no methods.
I think the Result object should have some kind of discriminated tag to help with type narrowing when interacting with object manually.  It could be a Symbol or a read only string.  This allows us to capture if the source of the result threw an error even if the Error path itself was the value null.
You can model this interface in Typescript like this:
type Result<Error, Data> =
  (
    [Error, null]
    &
    { tag: 'Error'
    , value: Error
    }
  )
  |
  (
    [null, Data]
    &
    { tag: 'Data'
    , value: Data
    }
  )

This means we get to keep the sugar but also have an extensible interface for future proposals/additions.

I came here to post the same issue, but...

Oh wow I stand corrected, my mind is blown 🤯 I've still been working under the assumptions of pre TypeScript 4.6 where destructured discriminated narrowing wasn't a thing. Though I guess it's worth considering anyway.

TIL 😄

That said I guess I do still stand by the suggestion for it to be an object over the tuple approach.

I do not. 🤔
Destructuring a tuple makes it easy and natural (and necessary) to assign local names to both values.
This becomes important when making multiple calls to functions that may return errors, in the same local scope.
With objects, it's tempting to just name the return values as they're named in the returned object - but this falls apart of you need to make more than one call. You have to rename them then, which is rather clunky with object destructuring.
const { error: error1, data: value1 } ?= function1();
const { error: error2, data: value2 } ?= function2();

as opposed to:
const [error1, value1] = function1();
const [error2, value2] = function2();

Tuple return types encourage you to destructure and rename the values - it's the idiomatic "multiple return values" pattern in JS, and multiple return values is exactly what we have here.
With the object approach, it's likely some people will prefer const result1 ?= function1() and accessing the properties, rather than destructuring, which invites inconsistencies in code.
With times, no one wants to write result1[0], so they will learn to consistently destructure and assign meaningful names.
I believe this is part of the reason why e.g. Solid and React uses tuple returns when creating getters and setters for state management - it's the idiomatic multiple return value pattern in JS, and the returned values should be named at the call site, just as any singular return value from any other function call gets named at the call site.

@JAForbes despite of my previous comment,  it is not possible to include typed errors in this proposal because the function that returns a typed error can also throw.
function stringify(value: unknown): Result<'ERR_FUNCTION_UNSERIALIZABLE', string> {
  if (typeof value === 'function') return err('ERR_FUNCTION_UNSERIALIZABLE');
  return JSON.stringify(value);
}

const x: { x?: unknown } = {};
x.x = x;

const result ?= stringify(x);

Here we get an error that is definitelly is not 'ERR_FUNCTION_UNSERIALIZABLE';
So, I guess it is senseless to try type errors in this proposal, that is aimed to handle exceptions gracefully.
Sure, we can try to do the following:
type Result<Error, Data> =
  (
    [Error, null]
    &
    { tag: 'Error'
    , value: Error
    }
  )
  |
  (
    [null, Data]
    &
    { tag: 'Data'
    , value: Data
    }
  )
  |
  (
    [unknown, Data]
    &
    { tag: 'Exception'
    , value: unknown
    }
  )

But it doesn't seem to simplify error handling both in TS and in JS

But this proposal would absorb the throw so in this context its fine right?

To be a bit more clear, the return type of the function isn't a result, but the result of the expression of  ?= in conjunction with the function execution has a type of Result<Error, Data>.

That said I guess I do still stand by the suggestion for it to be an object over the tuple approach.

I do not. 🤔
Destructuring a tuple makes it easy and natural (and necessary) to assign local names to both values.
This becomes important when making multiple calls to functions that may return errors, in the same local scope.
With objects, it's tempting to just name the return values as they're named in the returned object - but this falls apart of you need to make more than one call. You have to rename them then, which is rather clunky with object destructuring.
const { error: error1, data: value1 } ?= function1();
const { error: error2, data: value2 } ?= function2();

as opposed to:
const [error1, value1] ?= function1();
const [error2, value2] ?= function2();

Tuple return types encourage you to destructure and rename the values - it's the idiomatic "multiple return values" pattern in JS, and multiple return values is exactly what we have here.
With the object approach, it's likely some people will prefer const result1 ?= function1() and accessing the properties, rather than destructuring, which invites inconsistencies in code.

To clarify, my opinion here is a lot more indifferent than it was originally after learning destructured type discrimination works.

With tuples, no one wants to write result1[0], so they will learn to consistently destructure and assign meaningful names.
I believe this is part of the reason why e.g. Solid and React uses tuple returns when creating getters and setters for state management - we're expecting to have several of these pairs in the same scope, it's the idiomatic multiple return value pattern in JS, and the returned values should be named at the call site, just as any singular return value from any other function call gets named at the call site.

I'd agree it's a relatively small learning curve, but still larger than having named properties.
To your point that "no one wants to write result1[0]", this could also be seen as an argument in favour of the object approach if you do just want to assign it to a single result1 variable, as you can instead just access them as result1.error and result1.data without destructuring.
I'm still keen to hear more perspectives as I think it's worth giving careful consideration, despite my current sway to neutrality 😅

I don't think that TypeScript should be the deciding factor in how JS should evolve. TypeScript should just evolve to match the language, not the other way around. That said,

Tuples can be typed just fine
Thrown errors are always of type unknown, as we can throw literally anything
[fetchUserError, fetchedUser] is much cleaner to change names than { error: fetchUserError, data: fetchedUser }. Imagine doing this literally everywhere in your code.

const { error: errorOne, data: user } ?= await fetchUser('one');
if (errorOne) // handle

const { error: errorTwo, data: updated } ?= await updateUser('one', patch);
if (errorTwo) // handle

// vs

const [errorOne, user] ?= await fetchuser('one');
if (errorOne) // handle

const [errorTwo, updated] ?= await updateuser('one', patch);
if (errorTwo) // handle

That would get annoying real fast.

To summarise, what I was saying before I think we can have our cake and eat it too, just have an object with a [Symbol.iterator] that evaluates to the tuple.  You can use either syntax, tuple or object.

@JAForbes

To be a bit more clear, the return type of the function isn't a Result, but the result of the expression of ?= in conjunction with the function execution has a type of Result<Error, Data>.

Unfortunately, we cannot have Result<Error, Data> type ...
We will have Result<Data>, so errors will always be of unknown type.
But from the TS point of view it is better to have an object in any case:
interface Result<T> {
  [Symbol.result]():
    | { isError: false, value: T }
    | { isError: true, value: unknown }
}

Unfortunately, we cannot have Result<Error, Data> type ...
We will have Result<Data>, so errors will always be of unknown type.

we will rue the day when TS finally solves this. 😅
(probably never though?)

@arthurfiorette
About the tuple-it library. It works if error is of type Error or something like that.
The library doesn't work if error is {} or unknown:
import 'tuple-it/register'

type WorkData = { id: string; title: string; }

async function work(promise: Promise<WorkData>) {
  const [error, data] = await promise.tuple<unknown>()
  // const [error, data] = await promise.tuple<{}>()

  if (error) {
    console.log('Operation failed!')
    return false
  }

  /**
   * Type 'WorkData | undefined' is not assignable to type 'WorkData'.
   * Type 'undefined' is not assignable to type 'WorkData'.ts(2322)
   */
  const value: WorkData = data;

  console.log('Operation succeeded!')
  return true
}

Typescript in strict mode treats exceptions as unknown by default, so semantically to use something else doesn't seem to be correct.

Hmm, nice catch @DScheglov! Will create an issue there :)

@arthurfiorette
About the tuple-it library. It works if error is of type Error or something like that. The library doesn't work if error is {} or unknown:
import 'tuple-it/register'

type WorkData = { id: string; title: string; }

async function work(promise: Promise<WorkData>) {
  const [error, data] = await promise.tuple<unknown>()
  // const [error, data] = await promise.tuple<{}>()

  if (error) {
    console.log('Operation failed!')
    return false
  }

  /**
   * Type 'WorkData | undefined' is not assignable to type 'WorkData'.
   * Type 'undefined' is not assignable to type 'WorkData'.ts(2322)
   */
  const value: WorkData = data;

  console.log('Operation succeeded!')
  return true
}

Typescript in strict mode treats exceptions as unknown by default, so semantically to use something else doesn't seem to be correct.

I knew I'd ran into issues with this quirk recently, just couldn't recall how.
I wonder if this necessitates the need to include an additional success property/element (or ok to steal from Rust?) to be able to guarantee the discrimination works if the data or error values can be nullish.
e.g.
type Result<TError = unknown, TData = unknown> =
    { success: true, data: TData, error: null } |
    { success: false, data: null, error: TError };

function handleResult({success, error, data}: Result<"Oops!" | undefined, "Success!" | undefined>) {
    if (success) {
        console.log('Success:', data);
    } else {
        console.log('Error:', error);
    }
}

or even consolidate data and error into a single value property/element:
type Result<TError = unknown, TData = unknown> =
    { success: true, data: TData, error: null } |
    { success: false, data: null, error: TError };

function handleResult({success, error, data}: Result<"Oops!" | undefined, "Success!" | undefined>) {
    if (success) {
        console.log('Success:', data);
    } else {
        console.log('Error:', error);
    }
}

I recommend looking in to prior art in JavaScript.
From 'Promise`:
Promise rejected values are not typed because promises catch thrown values. This proposal has the same issue.
From Promise.allSettled():
This takes promises and converts them to "outcome objects". Using it on a single promise is analogous to an asynchronous version of this proposal.
const [outcome] = await Promise.allSettled([promise])

outcome satisfies { status: "resolved", value: T } | { status: "rejected", reason: unknown }

From Response:
Responses have an ok property with a Boolean value that discriminates whether the HTTP Status Code is ok (i.e. in the 2XX range).

@arthurfiorette
As I wrote in one of other comments in TS we need a way to have a type errors.
Using the tuples for the result assumes at least this value is non nullable. That actually doesn't match to a EcmaScript statement: any value could be thrown.
TS just highlights that.
But yes, from the JS point of view there is no sense to have a typed errors but using the tuple allows to simplify naming.
I see something like a compromise between the TS and JS needs:

The result type must be explicitly return from the function, and this type is the following:type Result<T, E> = {
  [Symbol.result]():
    | { isError: true, error: E }
    | { isError: false, value: T }
}

The operator ?= implicitly wraps the expression in try .. catch and return the ErrValueTuple, that is the following:type ErrValueTuple<T> =
  | readonly [NonNullable<unknown>, never]
  | readonly [NonNullable<unknown>, undefined]
  | readonly [null, T]

The operator ?= checks if the expression result is type of Result<T, E> it also returns the ErrValueTuple<T>
The operator ?= checks if caught, rejected or E-value is nullish, then it wraps it to some specific error class to desribe the issue and returns the correspondent ErrValueTuple
The operator try? applied to Result<T, E>:
4.1. returns T or
4.2. exists from the current function with Result<never, E>
The operator try! applied to Result<T, E>:
5.1. return T or
5.2. throws a E

This approach is more consistent:

it matches the EcmaScript statement
it doesn't prevent the Symbol.result to support the type errors
we have visible reasons to use ?= to get ErrValueTuple and try?! to apply to void values (meaing the cases when we don't need the value)

@DScheglov we don't create JS to adapt to current TS code. This is wrong and i refuse to do it as well any other member of TC39.
We first figure the best way to have it in JS and then TS adapts itself to best handle the new behavior.

Closed by https://github.com/arthurfiorette/proposal-safe-assignment-operator/issues/30

@arthurfiorette

we don't create JS to adapt to current TS code
Who does speak abou adopting current TS code?

The proposal introduces Symbol.result that just it become a part of ES brings the problem to TS.
So, it makes sense to consider the typing aspects on the early phases.


[Feature]: Hopefully, can leave the title unset

What problem does this feature solve?
When using the Title and Meta Provider of solidjs, I found that the Title was added, but it did not take effect because rsbuild automatically added the title. You must use on Mount to remove the title first, but this will cause additional overhead. I hope it can be omitted in subsequent versions. title

What does the proposed API look like?
The website name can be set dynamically

I don't want to use extra DOM manipulation to get rid of automatically added titles. So I want to be able to leave the title out, that is, not add a title tag. I have tried to set an empty string or undefined in rsbuild.config.ts


Explore ability to search by out of state placement status

Talk with CSC's about preferences about more specification on kids who can and cannot be placed with OOS families, and how to refine access either through searchability or account permissions.

already on board

already on board


Minor improvements

Some small fixes made while debugging a test failure:

output of storage cluster create changed to only output the id (removed prefix)
tests to verify id is in correct format
remove variables from most test names (left docker tests) so that test results analyzer works better

Fixed the CLUSTER_ID format test and re-ran full suite.


Server crashes

Sometimes the server crashes unexpectedly.

Yes thanks for the great bug report. Please include crash logs. Also, use the script to run it and not the application

I've fixed two major crashes in the latest update. Download it and tell me if this solves the problems?
https://github.com/shusain93/OSXMessageProxy/releases/tag/1.1

The new version seems to solve the problem.


Error installing CosyPose due to C++ extension

Current installation procedure on dev branch comprises installing cosypose by running python setup.py install inside
happypose/happypose/pose_estimators/cosypose/ folder. This results in an error message ending with:
  File "/home/ros/miniconda3/envs/happypose/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
    self.build_extensions()
  File "/home/ros/miniconda3/envs/happypose/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 396, in build_extensions
    self._check_abi()
  File "/home/ros/miniconda3/envs/happypose/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 762, in _check_abi
    compiler = self.compiler.compiler_cxx[0]
IndexError: list index out of range

A hotfix is to bypass building the C++ extension by modifying the setup.py script:
setup(
    name='cosypose',
    version='1.0.0',
    description='CosyPose',
    packages=find_packages(),
    ext_modules=[
        # CppExtension(
        #     name='cosypose_cext',
        #     sources=[
        #         'cosypose/csrc/cosypose_cext.cpp'
        #     ],
        #     extra_compile_args=['-O3'],
        #     verbose=True
        # )
    ],
    cmdclass={
        'build_ext': BuildExtension
    }
)

Hello,
What architecture (x86/ARM/...) are you using?

I had a similar issue when installing cosypose on a Mac M1 (arm)
I simply had to comment the line :
https://github.com/Simple-Robotics/cosypose/blob/1e45363d0ac061d0cc2c0f42eb4c745bbf2b951e/setup.py#L9
So in your case, I guess ? :
https://github.com/agimus-project/happypose/blob/238b33383a38b23ebcfd95effefeb3d995ef00df/cosypose/setup.py#L9

This solution does compile indeed, I'll open a PR

However, I don't understand the role of the line you are pointing to @EtienneAr since in my case both CXX and GXX are either empty (if I do it wrong) or they point to the same compiler. I think we should remove it and maybe add an assert that checks instead if these variables are empty.


Support compute step on primitive schema types

Addresses: #38
This patch adds support for computing primitive schema types. Implementation notes:

Add a new validation on the compute steps config to ensure uniqueness. In case of overwriting a primitive type value, the compute field will be value and the validation will guarantee a single compute name value. An alternative approach would be to pick the last one (could be confusing to the user) or cascade the computation (adds complexity, user can always cascade if needed by creating separate steps).
Validation is one is custom, ideally it should be in the schema validator but there is no direct way to ensure uniqness based on a key inside array of objects - here are the uniqness use cases implemented for uniqueItems
The select mapping between compute fields types and generic primitive schema is (the date/time types are the best mapping I could come up in light of Pulsar schema types:

      ComputeFieldType.STRING -> org.apache.pulsar.client.api.Schema.STRING;
      ComputeFieldType.INT32 -> org.apache.pulsar.client.api.Schema.INT32;
      ComputeFieldType.INT64 -> org.apache.pulsar.client.api.Schema.INT64;
      ComputeFieldType.FLOAT -> org.apache.pulsar.client.api.Schema.FLOAT;
      ComputeFieldType.DOUBLE ->  org.apache.pulsar.client.api.Schema.DOUBLE;
      ComputeFieldType.BOOLEAN -> org.apache.pulsar.client.api.Schema.BOOL;
      ComputeFieldType.DATE -> org.apache.pulsar.client.api.Schema.DATE;
      ComputeFieldType.TIME ->  org.apache.pulsar.client.api.Schema.TIME;
      ComputeFieldType.DATETIME -> org.apache.pulsar.client.api.Schema.TIMESTAMP;

There's a small mismatch between the AVRO field types and the Pulsar schema ones.
Currently, for AVRO ComputeFieldType.DATE --> LocalDate but for Pulsar Schema, it should be ComputeFieldType.DATE --> j.u.Date.
I think we should have the latter and ComputeFieldType.LOCAL_DATE --> LocalDate for both AVRO and Pulsar.
And for AVRO, either not support ComputeFieldType.DATE or have ComputeFieldType.DATE --> OffsetDateTime

Currently, for AVRO ComputeFieldType.DATE --> LocalDate

So there is no 1:1 mapping between Java dates types and AVRO types. As far as user is concerned they are getting an int of "e number of days from the unix epoch" as per AVROs date logical type.
This is calculated like so:
(int) localDate.toEpochDay();

And for AVRO, either not support ComputeFieldType.DATE or have ComputeFieldType.DATE --> OffsetDateTime

Not supporting DATE seems unnecessarily limiting  the user experience, and OffsetDateTime will force the user to have the Time portion in their String or whatever they are converting from, so Date seems the more natural fit. What did I miss?
I agree on the Pulsar schema front, there are some mismatches gaps I'll try to cover...

I mean for AVRO, use ComputeFieldType.LOCAL_DATE instead of ComputeFieldType.DATE.
To avoid confusion with SchemaType.DATE

In the latest patch:

Added support for primitive key type in a key value schema
Deprecated DATETIME
Added the exhaustive list of Pulsar schema type (INT8, INT16, LOCAL_TIME, LOCAL_DATE, LOCAL_DATE_TIME, INSTANT, TIMESTAMP)
Supported that new added type in AVRO

@cbornet PTAL.

Awesome work @aymkhalil !


webhookconfiguration isn't cleaned up on operator deletion, and grows by namespaces

Describe the bug
When deleting cf-operator, incl. it's kubernetes namespace, webhookconfigurations remain in the default namespace. When redeploying cf-operator to a different namespace than before, new webhookconfigurations get created in addition to those existing already, and managed deployments, like e.g. kubecf can pick invalid ones.
As a result, kubecf deployment will fail with, e.g.
Error: Internal error occurred: failed calling webhook "validate-boshdeployment.quarks.cloudfoundry.org": Post https://cf-operator-webhook.cf-operator.svc:443/validate-boshdeployment?timeout=30s: service "cf-operator-webhook" not found

The two webhookconfigurations of interest are:
> kubectl get mutatingwebhookconfigurations.admissionregistration.k8s.io
> kubectl get validatingwebhookconfigurations.admissionregistration.k8s.io

To Reproduce
We will first have operator in namespace cf-operator, and install kubecf (successful).
Then we delete everything, and deploy cf-operator in namespace cfo - and kubecf will fail:
> kubectl create namespace cf-operator

> helm3 install cf-operator local/cf-operator-6.1.17+0.gec409fd7 --namespace cf-operator --set "global.singleNamespace.name=scf"

> helm3 install scf local/kubecf-2.5.8 --namespace scf --values kubecf-config-values_metallb.yaml

> helm3 delete scf -n scf; kubectl delete namespace scf; helm3 delete cf-operator -n cf-operator; kubectl delete namespace cf-operator

> wc -w resources
67 resources

> for i in $(cat resources); do if [ "$(kubectl get $i -o yaml | grep hook-cf-operator &>/dev/null && echo $?)" = "0" ]; then echo $i; fi; done
mutatingwebhookconfigurations.admissionregistration.k8s.io
validatingwebhookconfigurations.admissionregistration.k8s.io

> kubectl get mutatingwebhookconfigurations.admissionregistration.k8s.io
NAME                           WEBHOOKS   AGE
cf-operator-hook-cf-operator   4          133m

> kubectl get validatingwebhookconfigurations.admissionregistration.k8s.io
NAME                           WEBHOOKS   AGE
cf-operator-hook-cf-operator   2          133m

> kubectl create namespace cfo

> helm3 install cf-operator local/cf-operator-6.1.17+0.gec409fd7 --namespace cfo --set "global.singleNamespace.name=scf"

> helm3 install scf local/kubecf-2.5.8 --namespace scf --values kubecf-config-values_metallb.yaml
Error: Internal error occurred: failed calling webhook "validate-boshdeployment.quarks.cloudfoundry.org": Post https://cf-operator-webhook.cf-operator.svc:443/validate-boshdeployment?timeout=30s: service "cf-operator-webhook" not found

> kubectl get mutatingwebhookconfigurations.admissionregistration.k8s.io
NAME                           WEBHOOKS   AGE
cf-operator-hook-cf-operator   4          142m
cf-operator-hook-cfo           4          2m16s

> kubectl get validatingwebhookconfigurations.admissionregistration.k8s.io
NAME                           WEBHOOKS   AGE
cf-operator-hook-cf-operator   2          142m
cf-operator-hook-cfo           2          2m42s

Expected behavior
webhookconfiguration to always match the current namespace-names resp. service-names. This can be achieved by e.g. deleting those on operator deletion, even when they are located in default, or aren't namespaced - or by making them belong to the cf-operator namespace, so they would get deleted on namespace deletion.
Environment

cf-operator-6.1.17+0.gec409fd7
kubecf-2.5.8

Workaround
The following workaround has been tested up to succesful cf login to kubecf.
When a user hit the error above, or on any cf-operator deletion, the two webhookconfigurations of the former, resp. old namespace(s) have to be deleted in additon to the general deployment removal:
> kubectl delete mutatingwebhookconfigurations.admissionregistration.k8s.io cf-operator-hook-cf-operator
mutatingwebhookconfiguration.admissionregistration.k8s.io "cf-operator-hook-cf-operator" deleted

> kubectl delete validatingwebhookconfigurations.admissionregistration.k8s.io cf-operator-hook-cf-operator
validatingwebhookconfiguration.admissionregistration.k8s.io "cf-operator-hook-cf-operator" deleted

Then the following kubecf deployment will succeed.

@svollath
Hooks are not namespaced and can't belong to a namespace.  I think we could use a post-delete https://helm.sh/docs/topics/charts_hooks/
However, installing the operator again should update that webhook. Can you retry with helm3 install --wait (https://github.com/cloudfoundry-incubator/kubecf/issues/1194)?

Turns out when the second operator is installed in a different namespace, the original hook configuration is not updated or deleted.
We'll fix this by adding a hook to helm and do better clean up.


Add [aws copilot] to ubuntu

Tool name
aws copilot
Tool license
Apache License
Add or update?

[X] Add
[ ] Update

Desired version
latest
Approximate size
No response
Brief description of tool
The AWS Copilot CLI is a tool for developers to build, release and operate production ready containerized applications on AWS App Runner or Amazon ECS on AWS Fargate.
We already have aws tooling in github hosted runners. aws copilot is cli tool to deploy ecs containers in an aws opinionated way. This has several benefits.
Currently people have been using things like: https://github.com/ksivamuthu/aws-copilot-github-action
URL for tool's homepage
https://github.com/aws/copilot-cli
Provide a basic test case to validate the tool's functionality.
copilot deploy

Platforms where you need the tool

[ ] Azure DevOps
[X] GitHub Actions

Runner images where you need the tool

[X] Ubuntu 20.04
[X] Ubuntu 22.04
[ ] macOS 11
[ ] macOS 12
[ ] macOS 13
[ ] macOS 13 Arm64
[ ] macOS 14
[ ] macOS 14 Arm64
[ ] Windows Server 2019
[ ] Windows Server 2022

Can this tool be installed during the build?
Yes

Tool installation time in runtime
No response
Are you willing to submit a PR?
Yes

Hello @geekodour!
We do not have plans to bake aws copilot into the images due to maintenance concerns and short installation time. Please continue installing in runtime using the official installation steps or community action.


Align to PDD

As discussed in the meeting, the following have been added to this PR to align with the PDD

Constants found in constants.dart have been aligned to match the PDD
Creation of static method to retrieve the consent message for a given DashTool without having to create an instance of Analytics – previously, you had to create an instance of the Analytics class to retrieve the message

Other various updates that remove unnecessary inputs for the analytics implementation constructor as well + documentation updates

@bwilkerson I believe this should be good to go for a review now. As discussed on our call, the clientShowedMessage() instance method only needs to be invoked when first onboarding a tool or when the version of the message has changed.


Workflows are referencing vulnerable actions

Hello, there!
As part of the university research we are currently doing regarding the security of Github Actions, we noticed that one or many of the workflows that are part of this repository are referencing vulnerable versions of the third-party actions. As part of a disclosure process, we decided to open issues to notify GitHub Community.
Please note that there are could be some false positives in our methodology, thus not all of the open issues could be valid. If that is the case, please let us know, so that we can improve on our approach. You can contact me directly using an email: ikoishy [at] ncsu.edu
Thanks in advance

The workflow main.yml is referencing action gittools/actions/gitversion/setup using references v0.9. However this reference is missing the commit 90150b4 which may contain fix to the vulnerability.
The workflow main.yml is referencing action gittools/actions/gitversion/execute using references v0.9. However this reference is missing the commit 90150b4 which may contain fix to the vulnerability.

The vulnerability fix that is missing by actions' versions could be related to:
(1) CVE fix
(2) upgrade of vulnerable dependency
(3) fix to secret leak and others.
Please consider updating the reference to the action.
If you end up updating the reference, please let us know. We need the stats for the paper :-)

Hi Thanks for the issue. I have updated the action to reference the latest version published at this moment i.e v0.9.11


[bug]: How Can I upload .xlsx and .docx files?

Provide environment information
System:
    OS: macOS 14.2.1
    CPU: (8) arm64 Apple M1
    Memory: 637.33 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.17.0 - /usr/local/bin/node
    npm: 9.6.7 - /usr/local/bin/npm
    bun: 1.0.22 - ~/.bun/bin/bun
  Browsers:
    Chrome: 122.0.6261.94
    Safari: 17.2.1
  npmPackages:
    @uploadthing/react: ^6.2.2 => 6.2.2
    typescript: 5.3.3 => 5.3.3
    uploadthing: ^6.3.3 => 6.3.3

Describe the bug
My UploadThing works perfectly on my next js project but i don't see a way to select and upload file in "microsoft exel/ word" format....
I see in a config file that exist "text/csv" but is now enough for my clients
Link to reproduction
https://github.com/Firephoenix25/isomorphic
To reproduce
i don't think you need to reproduce because is not a bug i think...
fell free to ask me question about the project
Additional information
No response
👨👧👦 Contributing

[ ] 🙋♂ Yes, I'd be down to file a PR fixing this bug!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

You can use any valid mime-type as a key in your filerouter. See here for a good resource to look them up.
.docx :
application/vnd.openxmlformats-officedocument.wordprocessingml.document

.xlsx
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

thanks, helped a lot🔥

Shouldn't this be one of those defaults without us adding mime types? It's a reality in business that we upload word documents, excel files, powerpoint, etc.. Thanks.


Simplify calls to state in createOrderDeatilsObject() function.

Description

I simplified the calls to this.state in the return value of createOrderDetailsObject().
Related Issue

N/A
Motivation and Context

This improves readability of the function.
How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[x] All new and existing tests passed.

Looks better! 👍


az ad group member add is not idempotent

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug
I'm running this command from an Azure DevOps pipeline as part of our infrastructure deployment and without additional care these commands fail for subsequent runs.
To Reproduce
az ad group member add -g $rg --member-identity $id
az ad group member add -g $rg --member-identity $id

One or more added object references already exist for the following modified properties: 'members'.

Expected behavior
No error.
Environment summary

azure-cli                         2.19.1

core                              2.19.1
telemetry                          1.0.6

Extensions:
datafactory                        0.2.0
azure-devops                      0.18.0
resource-graph                     1.1.0
application-insights               0.1.5
image-copy-extension               0.0.7

Additional context
I've run the same command on ubuntu, macOs and Windows. Here's my workaround: https://twitter.com/MRiezebosch/status/1359533376777179137

Graph

Also encountering this problem. This is at odds with how almost everything else in Azure works; commands should be idempotent.


Registered Domains without IN A record will be ignored

Due to the use of gethostbyname Domainnames that are registered/delegated but for which no IN A record has been set will get listed as "empty". Potentially those can sport the relevant IN A records at times when say their phishing website is temporarily up and appear "harmless" in dnstwist otherwise.
As http://www.heise.de/newsticker/meldung/Dnstwist-variiert-und-testet-Domainnamen-2690418.html [DE] has pitched this project a little bit of documentation pointing out the limits of dnstwist might be nice.

Thank you for your opinion. The next release will check also for IN NS and IN MX records, which should be more than sufficient to determine whether domain is delegated.
When it comes to documentation that will try to write something very soon. Stay tuned!


Remove private keys from github

First Of All I am not an expert in web security. But as far as I am concerned private keys are meant to be kept private. Currently the private SSL key (server.key) of this project is clearly visible for everyone. Maybe check this out for some further reading.
You should definitly remove the server.key and server.crt from the repository and consider them to be compromised.

Those keys are only used for local testing while developing, they are not used for any real deployment.
If you check this line in index.js you will see it only uses those keys if it's being run bound to localhost.

Alright, thank you very much for clarifying that. This actually makes a lot of sense.
Have a nice day.


Join next meeting via Hotkey?

Hey there!
I would love to be able to join the next meetings conference via a Hotkey.
Apps like Notion Calendar (Cron Calendar) allow this via CMD + SHIFT + J.
Not sure if this possible, but would love it if so.
Cheers!

@jamie9090 In theory, this should be possible, but it may be a strange user experience—it takes a second or two for the script to load calendar events, so you may not get any immediate feedback.
But one thing you could do is attach a hotkey object to the "Show Alfred" workflow object (where the workflow object is configured to show the "conf" keyword in Alfred). Of course, you would need to press the Enter key once the results come up, but this should be a small extra step.
I would recommend creating this as a separate workflow so that the main OCU workflow can still receive updates without overwriting your hotkey changes. At any rate, here's a bare-bones workflow to give you an idea of how this could work—feel free to modify and extend it.
Open Conference URL Hotkey.zip


checking/unchecking row / parent checkboxes in data-table seem wrong

If I check all checkboxes by selecting the header-checkbox and if I deselect one of the child checkboxes shouldn't the header-checkbox also deselect?

Duplicate of #932


On prem - running a prediction with uri storage problem

Hi,
I got non-admin access to on prem Kubeflow Platform and I would like to deploy and inference my previously created model with KServe.
I created InferenceService using: https://kserve.github.io/website/0.8/modelserving/storage/uri/uri/ (without secret feature).
sklearn-from-uri.yaml:
apiVersion: serving.kserve.io/v1beta1
kind: InferenceService
metadata:
name: sklearn-from-uri
spec:
predictor:
sklearn:
storageUri: https://github.com/szyba3224/kserve-test/blob/main/model.joblib?raw=true
(base) jovyan@j1-0:/uri_try$ kubectl apply -f sklearn-from-uri.yaml
inferenceservice.serving.kserve.io/sklearn-from-uri created
(base) jovyan@j1-0:/uri_try$ kubectl get inferenceservice
NAME               URL                                                      READY   PREV   LATEST   PREVROLLEDOUTREVISION   LATESTREADYREVISION                        AGE
sklearn-from-uri   http://sklearn-from-uri.XXX.example.com   True           100                              sklearn-from-uri-predictor-default-00001   2m41s
And now I can't figure out how to get Ingress Host and Port for curl request, I can't find it in Kserve documentation - showed ways don't work for me ( https://kserve.github.io/website/0.8/get_started/first_isvc/#4-determine-the-ingress-ip-and-ports ):
(base) jovyan@j1-0:/uri_try$ kubectl get svc istio-ingressgateway -n istio-system
[...]
Error from server (Forbidden): services "istio-ingressgateway" is forbidden: User "system:serviceaccount:XXX:default-editor" cannot get resource "services" in API group "" in the namespace "istio-system"
Other commands in this kserve's documentation section also are forbidden.
I also tried to use example from kubeflow github:
https://github.com/kubeflow/examples/blob/master/kserve/sdk/first_isvc_kserve.ipynb
I modified Define InferenceService section for:
namespace = XXX
name='sklearn-from-uri'
api_version = "serving.kserve.io/v1beta1"
isvc = V1beta1InferenceService(api_version=api_version,
kind="InferenceService",
metadata=
client.V1ObjectMeta(
name=name, namespace=namespace),
spec=V1beta1InferenceServiceSpec(
predictor=V1beta1PredictorSpec(
sklearn=(V1beta1SKLearnSpec(
storage_uri = "https://github.com/szyba3224/kserve-test/blob/main/model.joblib?raw=true",
))))
)
InferenceService is giving me status Ready - True, but next step with prediction doesn't work for me:
import requests

isvc_resp = KServe.get(name, namespace=namespace)
isvc_url = isvc_resp['status']['address']['url']

print(isvc_url)

inference_input = {
'instances': [
[6.8,  2.8,  4.8,  1.4],
[6.0,  3.4,  4.5,  1.6]
]
}

response = requests.post(isvc_url, json=inference_input)
print(response.text)
Output:
http://sklearn-from-uri.XXX.svc.cluster.local/v1/models/sklearn-from-uri:predict
404: Model with name sklearn-from-uri does not exist.404: Model with name sklearn-from-uri does not exist.
My file in GitHub has name "model.joblib", changing name in InferenceService for model (name "model.joblib give me error) doesn't work. What can I do to get predictions?
Regards

@szymonbcoding can you help paste the log from predictor pod?

@szymonbcoding can you help paste the log from predictor pod?

(base) jovyan@j4-0:~$ kubectl logs sklearn-from-uri-predictor-default-00001-deployment-c466f7mkmp7
error: a container name must be specified for pod sklearn-from-uri-predictor-default-00001-deployment-c466f7mkmp7, choose one of: [kserve-container queue-proxy] or one of the init containers: [storage-initializer]
(base) jovyan@j4-0:~$ kubectl logs sklearn-from-uri-predictor-default-00001-deployment-c466f7mkmp7 --all-containers=true
/usr/local/lib/python3.7/site-packages/ray/autoscaler/_private/cli_logger.py:61: FutureWarning: Not all Ray CLI dependencies were found. In Ray 1.4+, the Ray CLI, autoscaler, and dashboard will only be usable via pip install 'ray[default]'. Please update your install command.
"update your install command.", FutureWarning)
[I 220626 01:33:26 initializer-entrypoint:13] Initializing, args: src_uri [https://github.com/szyba3224/kserve-test/blob/main/new_model.joblib?raw=true] dest_path[ [/mnt/models]
[I 220626 01:33:26 storage:52] Copying contents of https://github.com/szyba3224/kserve-test/blob/main/new_model.joblib?raw=true to local
/usr/local/lib/python3.7/site-packages/ray/autoscaler/_private/cli_logger.py:61: FutureWarning: Not all Ray CLI dependencies were found. In Ray 1.4+, the Ray CLI, autoscaler, and dashboard will only be usable via pip install 'ray[default]'. Please update your install command.
"update your install command.", FutureWarning)
[I 220626 01:33:38 storage:52] Copying contents of /mnt/models to local
[E 220626 01:33:38 main:37] fail to load model sklearn-from-uri from dir /mnt/models. exception type <class 'RuntimeError'>, exception msg: Missing Model File.
[I 220626 01:33:38 kfserver:120] Setting asyncio max_workers as 5
[I 220626 01:33:38 kfserver:127] Listening on port 8080
[I 220626 01:33:38 kfserver:129] Will fork 1 workers
{"severity":"INFO","timestamp":"2022-06-26T01:33:37.355567287Z","caller":"logging/config.go:116","message":"Successfully created the logger."}
{"severity":"INFO","timestamp":"2022-06-26T01:33:37.355718836Z","caller":"logging/config.go:117","message":"Logging level set to: info"}
{"level":"info","ts":1656207217.3579745,"logger":"fallback","caller":"metrics/metrics_worker.go:76","msg":"Flushing the existing exporter before setting up the new exporter."}
{"level":"info","ts":1656207217.3581908,"logger":"fallback","caller":"metrics/prometheus_exporter.go:51","msg":"Created Prometheus exporter with config: &{knative.dev/internal/serving revision prometheus<PHONE_NUMBER>    false 9091 <IP_ADDRESS> false   {   false}}. Start the server for Prometheus exporter."}
{"level":"info","ts":1656207217.3582313,"logger":"fallback","caller":"metrics/metrics_worker.go:91","msg":"Successfully updated the metrics exporter; old config: ; new config &{knative.dev/internal/serving revision prometheus<PHONE_NUMBER>    false 9091 <IP_ADDRESS> false   {   false}}"}
(base) jovyan@j4-0:~$


[UC. 8.3] Enable Care Providers to indicate the status (i.e. it's a problem, not a problem) in Patient list view

Not implementing


fix go to top of page a href links

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

[ ] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
[ ] This message body should clearly illustrate what problems it solves.
[ ] Ideally, include a test that fails without this PR but passes with it.

Tests

[x] Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

[ ] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

This fixes https://github.com/sveltejs/kit/issues/11526

thanks! added a test in 87b36a01370d2ecba96dfc20ea170de5e8b913b1

@Rich-Harris The test looks great. Thanks for creating the best web development framework by far.


Switch to @faker-js/faker

After the recent faker.js incident, the community is actively maintaining faker throught faker-js/faker.

Thanks! Will change it soon

Hi,
Has this change been already merged?
Would it be possible to update the faker references to the latest @faker-js/faker version 7.5.0?
Regards
Arvind

Hi @arvindsedha, working on it, hoping to release very soon!

...working on it, and hoping to release it very soon!

Would a PR with the update be helpful? If so, I'm willing to work on it and contribute.


T::Struct pattern matching.

Problem
T::Struct can't participate in pattern matching, because it doesn't implement #deconstruct and #deconstruct_keys:
case typed_foo # This hits the "else"
in { i: 123 } then puts("Match!")
else puts("No match.")
end

case typed_foo # This hits the "else"
in [123] then puts("Match!")
else puts("No match.")
end

There's already precedence for supporting this, as the vanilla Struct type implements both #deconstruct and
#deconstruct_keys:
Although I'm a bit skeptical of implementing #deconstruct. Perhaps we should only support Hash-like destructing, because I feel like the order of property declarations shouldn't matter, but that's just my $0.02.
VanillaFoo = Struct.new(:i, keyword_init: true)

vanilla_foo = VanillaFoo.new(i: 123)

case vanilla_foo # Match!
in { i: 123 } then puts("Match!")
else puts("No match.")
end

case vanilla_foo # Match!
in [123] then puts("Match!")
else puts("No match.")
end

Proposed solution
Just add the two methods. A naïve solution is as simple as:
class T::Struct
  # ...

  def deconstruct_keys(array_of_names)
    h = serialize.symbolize_keys

    return h if array_of_names.nil?

    h.slice(*array_of_names)
  end

  def deconstruct = serialize.values

end

Thought it's probably worth optimizing by:

Generating the minimal necessary Hash (rather than generating the whole Hash and slicing it down
Generating the Hash using Symbols as keys, from the get-go.

Checking this statically will require more work on how we type pattern matching https://github.com/sorbet/sorbet/issues/6233.

@Morriar Would there be interest in my contributing this without static checking?
That brings T::Struct to parity with Struct. The pattern matching seems like an orthogonal, more generalizable feature.

My concern is that introducing this feature without static type typing will increase the amount of untyped code.
That being said, supporting the feature without static type checking is also the first step in supporting the feature anyway so you could definitely experiment with it.

Totally doable, but the built-in Struct has some pretty wild behaviours that we probably don't want to copy 1-for-1. Check out #6789


Add attributesToRecieve as an param

Hey guys, first of all thanks for the awesome work you provided!
I have a little question: As described in your Documentation there is an option to specify which attributes to receive from a query. I tried to configure it, but sadly it isn't considered in the transformToMeiliSearchParams-Function
https://github.com/meilisearch/instant-meilisearch/blob/master/src/index.js#L16-L22
Was there a specific reason to not include this? If not, is there a possibility to add this in a future release?
Thanks!

Hello @aaronschweig! Thanks for paying attention to this kind of detail!
What is exactly your usecase? Do you use an InstantSearch widget/option that allows you to define the attributes you want to retrieve? 🙂

Thanks for your quick answer!
I use the ais-configure Widget to further configure the parameters sent to MeiliSearch. It successfully worked for setting filters. But as i tried setting the attributesToRetrieve Property it doesn't appear in the request sent to the server 😄

Thanks for your detailed explanation, it helped me! I fix this issue in this PR #138! 😉

I'm facing a similar issue. I'm using vanilla js (instantsearch.js) and i'm not able to configure parameters like filters-- i tried using: instantsearch.widgets.configure(searchParameters: object); but it doesn't seem to be doing anything, i think because i'm using addWidgets?

Hello @aysark! I'm not sure this is linked to the attributesToRecieve issue. Can you open another one and detail how you use the configure widget so that I can fix the bug if it is one? 🙂

@curquiza thanks for the response--- but i actually figured it out, so there is no issue:
search.addWidgets([
		instantsearch.widgets.configure({
			filters: 'isFeatured = true'
		}),
	]);


Generate config docs from Zod schemas

Spike for the research is 2h.

Spike for research 2h.

The Python generator looks best (most compact), but requires Python and Pip installation to run.
There are still some common problems in how the generated docs look:

all the objects and arrays are defined inline, as it were, our object names (e.g. PluginConfig) don't make it in, only the descriptions
z.unions used in docsUrl and runner aren't handled very well, the runner function gets lost completely because it has no JSON representation
the material icon enum is very large, but unfortunately it gets inlined (could probably hack in a special case to separate it though)

The alternatives to using a 3rd party tool are:

document them manually - not great for long-term maintenance (duplicated structure and descriptions)
implement our own docs generator - requires a lot of implementation effort
The main advantage to doing it ourself is we can make it look just right for what we need.

Came up with an alternative way to document the config automatically - generate equivalent TypeScript instead of Markdown via JSON Schema - has the advantage of being able to represent what JSON can't (e.g. functions):

TypeScript definition generated by zod-to-ts
```ts
/** Code PushUp configuration */
type CoreConfig = {
    /** List of plugins to be used (official, community-provided, or custom) */
    plugins: {
        /** NPM package name */
        packageName?: string | undefined;
        /** NPM version of the package */
        version?: string | undefined;
        /** Descriptive name */
        title: string;
        /** Description (markdown) */
        description?: string | undefined;
        /** Plugin documentation site */
        docsUrl?: (string | undefined) | string;
        /** References plugin. ID (unique within core config) */
        slug: string;
        /** Icon from VSCode Material Icons extension */
        icon: "git" | "yaml" | "xml" | "matlab" | "settings" | "shaderlab" | "diff" | "json" | "blink" | "java" | "razor" | "python" | "mojo" | "javascript" | "typescript" | "scala" | "handlebars" | "perl" | "haxe" | "puppet" | "elixir" | "livescript" | "erlang" | "twig" | "julia" | "elm" | "purescript" | "stylus" | "nunjucks" | "pug" | "robot" | "sass" | "less" | "css" | "visualstudio" | "angular" | "graphql" | "solidity" | "autoit" | "haml" | "yang" | "terraform" | "applescript" | "cake" | "cucumber" | "nim" | "apiblueprint" | "riot" | "postcss" | "coldfusion" | "haskell" | "dhall" | "cabal" | "nix" | "ruby" | "slim" | "php" | "php_elephant" | "php_elephant_pink" | "hack" | "react" | "mjml" | "processing" | "hcl" | "go" | "go_gopher" | "nodejs_alt" | "django" | "html" | "godot" | "godot-assets" | "vim" | "silverstripe" | "prolog" | "pawn" | "reason" | "sml" | "tex" | "salesforce" | "sas" | "docker" | "table" | "csharp" | "console" | "c" | "cpp" | "objective-c" | "objective-cpp" | "coffee" | "fsharp" | "editorconfig" | "clojure" | "groovy" | "markdown" | "jinja" | "proto" | "python-misc" | "vue" | "lua" | "lib" | "log" | "jupyter" | "document" | "pdf" | "powershell" | "r" | "rust" | "database" | "kusto" | "lock" | "svg" | "swift" | "react_ts" | "search" | "minecraft" | "rescript" | "otne" | "twine" | "grain" | "lolcode" | "idris" | "chess" | "gemini" | "vlang" | "wolframlanguage" | "shader" | "tree" | "svelte" | "dart" | "cadence" | "stylable" | "blink_light" | "jinja_light" | "playwright" | "sublime" | "image" | "routing" | "typescript-def" | "markojs" | "astro" | "vscode" | "qsharp" | "zip" | "vala" | "zig" | "exe" | "hex" | "jar" | "javaclass" | "h" | "hpp" | "rc" | "go-mod" | "url" | "gradle" | "word" | "certificate" | "key" | "font" | "gemfile" | "rubocop" | "rubocop_light" | "arduino" | "powerpoint" | "video" | "virtual" | "email" | "audio" | "raml" | "xaml" | "kotlin" | "dart_generated" | "actionscript" | "mxml" | "autohotkey" | "flash" | "swc" | "cmake" | "assembly" | "semgrep" | "vue-config" | "nuxt" | "ocaml" | "odin" | "javascript-map" | "css-map" | "test-ts" | "test-jsx" | "test-js" | "angular-component" | "angular-guard" | "angular-service" | "angular-pipe" | "angular-directive" | "angular-resolver" | "smarty" | "bucklescript" | "merlin" | "verilog" | "mathematica" | "vercel" | "vercel_light" | "verdaccio" | "next" | "next_light" | "remix" | "remix_light" | "laravel" | "vfl" | "kl" | "posthtml" | "todo" | "http" | "restql" | "kivy" | "graphcool" | "sbt" | "webpack" | "ionic" | "gulp" | "nodejs" | "npm" | "yarn" | "android" | "tune" | "turborepo" | "turborepo_light" | "babel" | "blitz" | "contributing" | "readme" | "changelog" | "architecture" | "credits" | "authors" | "flow" | "favicon" | "karma" | "bithound" | "svgo" | "appveyor" | "travis" | "codecov" | "sonarcloud" | "protractor" | "fusebox" | "heroku" | "gitlab" | "bower" | "eslint" | "conduct" | "watchman" | "aurelia" | "auto" | "auto_light" | "mocha" | "jenkins" | "firebase" | "figma" | "rollup" | "hardhat" | "stylelint" | "stylelint_light" | "code-climate" | "code-climate_light" | "prettier" | "renovate" | "apollo" | "nodemon" | "webhint" | "browserlist" | "browserlist_light" | "crystal" | "crystal_light" | "snyk" | "drone" | "drone_light" | "cuda" | "dotjs" | "ejs" | "sequelize" | "gatsby" | "wakatime" | "wakatime_light" | "circleci" | "circleci_light" | "cloudfoundry" | "grunt" | "jest" | "storybook" | "wepy" | "fastlane" | "hcl_light" | "helm" | "san" | "wallaby" | "stencil" | "red" | "makefile" | "foxpro" | "i18n" | "webassembly" | "semantic-release" | "semantic-release_light" | "bitbucket" | "d" | "mdx" | "mdsvex" | "ballerina" | "racket" | "bazel" | "mint" | "velocity" | "azure-pipelines" | "azure" | "vagrant" | "prisma" | "abc" | "asciidoc" | "istanbul" | "edge" | "scheme" | "lisp" | "tailwindcss" | "3d" | "buildkite" | "netlify" | "netlify_light" | "nest" | "moonscript" | "percy" | "gitpod" | "advpl_prw" | "advpl_ptm" | "advpl_tlpp" | "advpl_include" | "codeowners" | "gcp" | "disc" | "fortran" | "tcl" | "liquid" | "husky" | "coconut" | "tilt" | "capacitor" | "sketch" | "adonis" | "forth" | "uml" | "uml_light" | "meson" | "commitlint" | "buck" | "nrwl" | "opam" | "dune" | "imba" | "drawio" | "pascal" | "roadmap" | "nuget" | "command" | "stryker" | "denizenscript" | "modernizr" | "slug" | "stitches" | "stitches_light" | "nginx" | "replit" | "rescript-interface" | "snowpack" | "snowpack_light" | "brainfuck" | "bicep" | "cobol" | "quasar" | "dependabot" | "pipeline" | "vite" | "vitest" | "opa" | "lerna" | "windicss" | "textlint" | "lilypond" | "chess_light" | "sentry" | "phpunit" | "php-cs-fixer" | "robots" | "tsconfig" | "tauri" | "jsconfig" | "maven" | "ada" | "serverless" | "supabase" | "ember" | "horusec" | "poetry" | "coala" | "parcel" | "dinophp" | "teal" | "template" | "astyle" | "lighthouse" | "svgr" | "rome" | "cypress" | "siyuan" | "ndst" | "plop" | "tobi" | "tobimake" | "gleam" | "pnpm" | "pnpm_light" | "gridsome" | "steadybit" | "caddy" | "bun" | "bun_light" | "antlr" | "pinejs" | "nano-staged" | "nano-staged_light" | "craco" | "gamemaker" | "tldraw" | "tldraw_light" | "mercurial" | "deno" | "deno_light" | "plastic" | "typst" | "unocss" | "ifanr-cloud" | "mermaid" | "werf" | "roblox" | "panda" | "file" | "folder-robot" | "folder-robot-open" | "folder-src" | "folder-src-open" | "folder-dist" | "folder-dist-open" | "folder-css" | "folder-css-open" | "folder-sass" | "folder-sass-open" | "folder-images" | "folder-images-open" | "folder-scripts" | "folder-scripts-open" | "folder-node" | "folder-node-open" | "folder-javascript" | "folder-javascript-open" | "folder-json" | "folder-json-open" | "folder-font" | "folder-font-open" | "folder-bower" | "folder-bower-open" | "folder-test" | "folder-test-open" | "folder-jinja" | "folder-jinja-open" | "folder-jinja_light" | "folder-jinja-open_light" | "folder-markdown" | "folder-markdown-open" | "folder-php" | "folder-php-open" | "folder-phpmailer" | "folder-phpmailer-open" | "folder-sublime" | "folder-sublime-open" | "folder-docs" | "folder-docs-open" | "folder-git" | "folder-git-open" | "folder-github" | "folder-github-open" | "folder-gitlab" | "folder-gitlab-open" | "folder-vscode" | "folder-vscode-open" | "folder-views" | "folder-views-open" | "folder-vue" | "folder-vue-open" | "folder-vuepress" | "folder-vuepress-open" | "folder-expo" | "folder-expo-open" | "folder-config" | "folder-config-open" | "folder-i18n" | "folder-i18n-open" | "folder-components" | "folder-components-open" | "folder-verdaccio" | "folder-verdaccio-open" | "folder-aurelia" | "folder-aurelia-open" | "folder-resource" | "folder-resource-open" | "folder-lib" | "folder-lib-open" | "folder-theme" | "folder-theme-open" | "folder-webpack" | "folder-webpack-open" | "folder-global" | "folder-global-open" | "folder-public" | "folder-public-open" | "folder-include" | "folder-include-open" | "folder-docker" | "folder-docker-open" | "folder-database" | "folder-database-open" | "folder-log" | "folder-log-open" | "folder-target" | "folder-target-open" | "folder-temp" | "folder-temp-open" | "folder-aws" | "folder-aws-open" | "folder-audio" | "folder-audio-open" | "folder-video" | "folder-video-open" | "folder-kubernetes" | "folder-kubernetes-open" | "folder-import" | "folder-import-open" | "folder-export" | "folder-export-open" | "folder-wakatime" | "folder-wakatime-open" | "folder-circleci" | "folder-circleci-open" | "folder-wordpress" | "folder-wordpress-open" | "folder-gradle" | "folder-gradle-open" | "folder-coverage" | "folder-coverage-open" | "folder-class" | "folder-class-open" | "folder-other" | "folder-other-open" | "folder-lua" | "folder-lua-open" | "folder-typescript" | "folder-typescript-open" | "folder-graphql" | "folder-graphql-open" | "folder-routes" | "folder-routes-open" | "folder-ci" | "folder-ci-open" | "folder-benchmark" | "folder-benchmark-open" | "folder-messages" | "folder-messages-open" | "folder-less" | "folder-less-open" | "folder-gulp" | "folder-gulp-open" | "folder-python" | "folder-python-open" | "folder-mojo" | "folder-mojo-open" | "folder-debug" | "folder-debug-open" | "folder-fastlane" | "folder-fastlane-open" | "folder-plugin" | "folder-plugin-open" | "folder-middleware" | "folder-middleware-open" | "folder-controller" | "folder-controller-open" | "folder-ansible" | "folder-ansible-open" | "folder-server" | "folder-server-open" | "folder-client" | "folder-client-open" | "folder-tasks" | "folder-tasks-open" | "folder-android" | "folder-android-open" | "folder-ios" | "folder-ios-open" | "folder-upload" | "folder-upload-open" | "folder-download" | "folder-download-open" | "folder-tools" | "folder-tools-open" | "folder-helper" | "folder-helper-open" | "folder-serverless" | "folder-serverless-open" | "folder-api" | "folder-api-open" | "folder-app" | "folder-app-open" | "folder-apollo" | "folder-apollo-open" | "folder-archive" | "folder-archive-open" | "folder-batch" | "folder-batch-open" | "folder-buildkite" | "folder-buildkite-open" | "folder-cluster" | "folder-cluster-open" | "folder-command" | "folder-command-open" | "folder-constant" | "folder-constant-open" | "folder-container" | "folder-container-open" | "folder-content" | "folder-content-open" | "folder-context" | "folder-context-open" | "folder-core" | "folder-core-open" | "folder-delta" | "folder-delta-open" | "folder-dump" | "folder-dump-open" | "folder-examples" | "folder-examples-open" | "folder-environment" | "folder-environment-open" | "folder-functions" | "folder-functions-open" | "folder-generator" | "folder-generator-open" | "folder-hook" | "folder-hook-open" | "folder-job" | "folder-job-open" | "folder-keys" | "folder-keys-open" | "folder-layout" | "folder-layout-open" | "folder-mail" | "folder-mail-open" | "folder-mappings" | "folder-mappings-open" | "folder-meta" | "folder-meta-open" | "folder-changesets" | "folder-changesets-open" | "folder-packages" | "folder-packages-open" | "folder-shared" | "folder-shared-open" | "folder-shader" | "folder-shader-open" | "folder-stack" | "folder-stack-open" | "folder-template" | "folder-template-open" | "folder-utils" | "folder-utils-open" | "folder-supabase" | "folder-supabase-open" | "folder-private" | "folder-private-open" | "folder-error" | "folder-error-open" | "folder-event" | "folder-event-open" | "folder-secure" | "folder-secure-open" | "folder-custom" | "folder-custom-open" | "folder-mock" | "folder-mock-open" | "folder-syntax" | "folder-syntax-open" | "folder-vm" | "folder-vm-open" | "folder-stylus" | "folder-stylus-open" | "folder-flow" | "folder-flow-open" | "folder-rules" | "folder-rules-open" | "folder-review" | "folder-review-open" | "folder-animation" | "folder-animation-open" | "folder-guard" | "folder-guard-open" | "folder-prisma" | "folder-prisma-open" | "folder-pipe" | "folder-pipe-open" | "folder-svg" | "folder-svg-open" | "folder-terraform" | "folder-terraform-open" | "folder-mobile" | "folder-mobile-open" | "folder-stencil" | "folder-stencil-open" | "folder-firebase" | "folder-firebase-open" | "folder-svelte" | "folder-svelte-open" | "folder-update" | "folder-update-open" | "folder-intellij" | "folder-intellij-open" | "folder-intellij_light" | "folder-intellij-open_light" | "folder-azure-pipelines" | "folder-azure-pipelines-open" | "folder-mjml" | "folder-mjml-open" | "folder-admin" | "folder-admin-open" | "folder-scala" | "folder-scala-open" | "folder-connection" | "folder-connection-open" | "folder-quasar" | "folder-quasar-open" | "folder-next" | "folder-next-open" | "folder-cobol" | "folder-cobol-open" | "folder-yarn" | "folder-yarn-open" | "folder-husky" | "folder-husky-open" | "folder-storybook" | "folder-storybook-open" | "folder-base" | "folder-base-open" | "folder-cart" | "folder-cart-open" | "folder-home" | "folder-home-open" | "folder-project" | "folder-project-open" | "folder-interface" | "folder-interface-open" | "folder-netlify" | "folder-netlify-open" | "folder-enum" | "folder-enum-open" | "folder-contract" | "folder-contract-open" | "folder-queue" | "folder-queue-open" | "folder-vercel" | "folder-vercel-open" | "folder-cypress" | "folder-cypress-open" | "folder-decorators" | "folder-decorators-open" | "folder-java" | "folder-java-open" | "folder-resolver" | "folder-resolver-open" | "folder-angular" | "folder-angular-open" | "folder-unity" | "folder-unity-open" | "folder-pdf" | "folder-pdf-open" | "folder-proto" | "folder-proto-open" | "folder-plastic" | "folder-plastic-open" | "folder-gamemaker" | "folder-gamemaker-open" | "folder-mercurial" | "folder-mercurial-open" | "folder-godot" | "folder-godot-open" | "folder" | "folder-open" | "folder-root" | "folder-root-open";
        runner: {
            /** Shell command to execute */
            command: string;
            args?: string[] | undefined;
            /** Output path */
            outputFile: string;
            outputTransform?: ((args_0: unknown, ...args_1: unknown[]) => {
                /** Reference to audit */
                slug: string;
                /** Formatted value (e.g. '0.9 s', '2.1 MB') */
                displayValue?: string | undefined;
                /** Raw numeric value */
                value: number;
                /** Value between 0 and 1 */
                score: number;
                /** Detailed information */
                details?: {
                    /** List of findings */
                    issues: {
                        /** Descriptive error message */
                        message: string;
                        /** Severity level */
                        severity: "info" | "warning" | "error";
                        /** Source file location */
                        source?: {
                            /** Relative path to source file in Git repo */
                            file: string;
                            /** Location in file */
                            position?: {
                                /** Start line */
                                startLine: number;
                                /** Start column */
                                startColumn?: number | undefined;
                                /** End line */
                                endLine?: number | undefined;
                                /** End column */
                                endColumn?: number | undefined;
                            } | undefined;
                        } | undefined;
                    }[];
                } | undefined;
            }[] | Promise<{
                /** Reference to audit */
                slug: string;
                /** Formatted value (e.g. '0.9 s', '2.1 MB') */
                displayValue?: string | undefined;
                /** Raw numeric value */
                value: number;
                /** Value between 0 and 1 */
                score: number;
                /** Detailed information */
                details?: {
                    /** List of findings */
                    issues: {
                        /** Descriptive error message */
                        message: string;
                        /** Severity level */
                        severity: "info" | "warning" | "error";
                        /** Source file location */
                        source?: {
                            /** Relative path to source file in Git repo */
                            file: string;
                            /** Location in file */
                            position?: {
                                /** Start line */
                                startLine: number;
                                /** Start column */
                                startColumn?: number | undefined;
                                /** End line */
                                endLine?: number | undefined;
                                /** End column */
                                endColumn?: number | undefined;
                            } | undefined;
                        } | undefined;
                    }[];
                } | undefined;
            }[]>) | undefined;
        } | ((args_0: ((args_0: unknown, ...args_1: unknown[]) => void | undefined) | undefined, ...args_1: unknown[]) => {
            /** Reference to audit */
            slug: string;
            /** Formatted value (e.g. '0.9 s', '2.1 MB') */
            displayValue?: string | undefined;
            /** Raw numeric value */
            value: number;
            /** Value between 0 and 1 */
            score: number;
            /** Detailed information */
            details?: {
                /** List of findings */
                issues: {
                    /** Descriptive error message */
                    message: string;
                    /** Severity level */
                    severity: "info" | "warning" | "error";
                    /** Source file location */
                    source?: {
                        /** Relative path to source file in Git repo */
                        file: string;
                        /** Location in file */
                        position?: {
                            /** Start line */
                            startLine: number;
                            /** Start column */
                            startColumn?: number | undefined;
                            /** End line */
                            endLine?: number | undefined;
                            /** End column */
                            endColumn?: number | undefined;
                        } | undefined;
                    } | undefined;
                }[];
            } | undefined;
        }[] | Promise<{
            /** Reference to audit */
            slug: string;
            /** Formatted value (e.g. '0.9 s', '2.1 MB') */
            displayValue?: string | undefined;
            /** Raw numeric value */
            value: number;
            /** Value between 0 and 1 */
            score: number;
            /** Detailed information */
            details?: {
                /** List of findings */
                issues: {
                    /** Descriptive error message */
                    message: string;
                    /** Severity level */
                    severity: "info" | "warning" | "error";
                    /** Source file location */
                    source?: {
                        /** Relative path to source file in Git repo */
                        file: string;
                        /** Location in file */
                        position?: {
                            /** Start line */
                            startLine: number;
                            /** Start column */
                            startColumn?: number | undefined;
                            /** End line */
                            endLine?: number | undefined;
                            /** End column */
                            endColumn?: number | undefined;
                        } | undefined;
                    } | undefined;
                }[];
            } | undefined;
        }[]>);
        audits: {
            /** ID (unique within plugin) */
            slug: string;
            /** Descriptive name */
            title: string;
            /** Description (markdown) */
            description?: string | undefined;
            /** Link to documentation (rationale) */
            docsUrl?: (string | undefined) | string;
        }[];
        groups?: {
            /** Human-readable unique ID, e.g. "performance" */
            slug: string;
            refs: {
                /** Reference slug to an audit within this plugin (e.g. 'max-lines') */
                slug: string;
                /** Weight used to calculate score */
                weight: number;
            }[];
            /** Descriptive name for the group */
            title: string;
            /** Description of the group (markdown) */
            description?: string | undefined;
            /** Group documentation site */
            docsUrl?: (string | undefined) | string;
        }[] | undefined;
    }[];
    persist: {
        /** Artifacts folder */
        outputDir: string;
        /** Artifacts file name (without extension) */
        filename?: string;
        format?: ("json" | "md")[] | undefined;
    };
    upload?: {
        /** URL of deployed portal API */
        server: string;
        /** API key with write access to portal (use `process.env` for security) */
        apiKey: string;
        /** Organization in code versioning system */
        organization: string;
        /** Project in code versioning system */
        project: string;
    } | undefined;
    categories: {
        /** Human-readable unique ID, e.g. "performance" */
        slug: string;
        refs: {
            /** Slug of an audit or group (depending on `type`) */
            slug: string;
            /** Weight used to calculate score */
            weight: number;
            /** Discriminant for reference kind, affects where `slug` is looked up */
            type: "audit" | "group";
            /** Plugin slug (plugin should contain referenced audit or group) */
            plugin: string;
        }[];
        /** Category Title */
        title: string;
        /** Category description */
        description?: string | undefined;
        /** Category docs URL */
        docsUrl?: (string | undefined) | string;
        /** Is this a binary category (i.e. only a perfect score considered a "pass")? */
        isBinary?: boolean | undefined;
    }[];
};
```

I've used up my timebox for this one.
@BioPhoton @vmasek What do you think? How should we proceed? I've described the alternatives above 🔝
My vote would be to generate the TypeScript definitions with zod-to-ts, because it's probably most readable for users and pretty low effort for us to maintain.

Follow-up issue defined:

#388


Add subitems to the table of contents

The problem
We have the new feature request coming from out design team. We would like to add subitems to selected ToC items. Having the single level of subitems should work for us for now (no need for subitems in subitems), but it might be nice to keep the API compatible with multiple levels, so they can be added in the future.
We would like to use it for the following pages:

Research areas of labs
Headings entered by researchers in their profiles (we are still considering this)

We are using the React implementation of ToC.
The solution

On SM and MD breakpoints, subitems could be implemented with the <optgroup> element.
Showing / hiding of subitems on LG and larger breakpoints could be probably accomplished, by adding / removing some property (like hideItems) from the parent item. But we are open to some other approach to this problem, that would satisfy our needs.
const headingItems = [
  {
    type: 'local',
    copy: 'DevOps',
    cta: {
      href: 'https://github.com/carbon-design-system/carbon-web-components',
    },
    // We would set the following prop to `false` (default), when the user would reach certain `scrollTop`.
    hideItems: true,
    items: [
      {  type: 'local', copy: 'Foo', ... },
      {  type: 'local', copy: 'Bar', ... },
    ],
  },
];

Application/website
https://research.ibm.com/
Business priority
Medium Priority = upcoming release but is not pressing
What time frame would this ideally be needed by (if applicable)
Upcoming release would be great. Some labs are already using this "research areas" section and there are more labs that will be migrated soon.
Examples

Here, is the list of some similar ToC libraries, most of them have subitems.
react-toc have subitems controlled by highestHeadingLevel and lowestHeadingLevel
rehype-toc is also having subitems generated from different heading levels

Code of Conduct

[X] I agree to follow this project's Code of Conduct
[X] I checked the current issues for duplicate issues

Closing due to no response


Not working

cloudflare page : http://pastebin.com/Jd9uHBtS (no idea why it's so long)
Traceback (most recent call last):
File "cloudflarescrap.py", line 8, in
raise ValueError("'%s' returned error %d, could not collect tokens." % (url, resp.status_code))
ValueError: 'http://csgo.steamanalyst.com' returned error 503, could not collect tokens.
For some reason, sometimes it gives this error, but more often it only gives the cfduid cookie (cfclerance empty). Edit: just tried the same script 50times.. 0.99/2 error 0.99/2 cfduid only, and only got both cookies twice edit: just got both cookies 5times in a row, but now it's back to errors for 20 or so tries.
I've got it working on another site, but for some reason it doesn't on this site.

Interesting, I'm not sure why that's happening. I'm not able to reproduce it no matter how many times I run it in a row.
The source code is large because they set up a custom Cloudflare loading page. If you upgrade above the free tier, you get that option. That should not affect cloudflare-scrape, though.
Can you try changing the sleep time here from 5 to 15 seconds? https://github.com/Anorov/cloudflare-scrape/blob/master/cfscrape/init.py#L50

I thought of changing the time to sleep (as when random things happen, timing may be related) but..
I can't reproduce it today either. Damn it, I'm 100% sure I've not changed the script that call cloudflarescrap, so..
Anyway I'm sorry I had to bother you with a non-issue. I'll take the opportunity to say thank you for coding this! I'll try to learn how did you get those cookies once I learn python a bit, but for now this python script is vital for me haha.

Cloudflare goes through a lot of effort to detect bots, so it's not too surprising they would occasionally flag your bot as... a bot. It is odd that it was only happening intermittently though. If you see it happening again, try changing the sleep time.

Oh I don't think so, it happened with the first request I ever made with the site.
Yup if it breaks again I'll increase the time.

The script returned 503 randomly but very often again today on different sites, I've checked the site in my browser and they indeed returned 503 to the first request. Sometimes it works, sometimes it don't, quite annoying.
So I reinstalled cloudflare to change the sleep time, tested everything from 1 to 20, didn't change behaviour at all (doesn't work as expected under 5 through). But after getting the last update it didn't work because of the print statement that was in python 2.7 style. And a bunch of other things I couldn't change didn't work.
I re-did everything with python2.7 and it's working flawlessly for now. I've got no idea what changed, why it couldn't get the cookies before.. But now it's working. So use 2.7.

$ python2.7 cloudflarescrap.py
'http://csgo.steamanalyst.com' returned error 503, could not collect tokens.
Traceback (most recent call last):
File "cloudflarescrap.py", line 7, in
tokens, user_agent = cfscrape.get_tokens(url, "Mozilla/5.0 (X11; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0")
File "build/bdist.linux-x86_64/egg/cfscrape/init.py", line 105, in get_tokens
File "/usr/lib/python2.7/site-packages/requests-2.7.0-py2.7.egg/requests/models.py", line 851, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 503 Server Error: Service Temporarily Unavailable
And it's here again.. No idea how to replicate, but it's always the 503 error. And visiting the site in a browser also show a 503 error, but it redirects after it.

(Phone lags too much to be used, so still investigating this issue)
(Remember, sometimes it works completely, so the program itself shouldn't be the problem) I found that if I refresh the target page in a browser at the same time I run your script, it works. It gives the cookies to my program, but once a request is made, I'm still welcomed by the cloudflare page despite having the correct cookies. (tested them on the browser).
Why on earth does the hotel wifi and its wifipass mess with my request but not my browser? And only 'sometimes'?

I made some recent changes with the get_tokens function. It now returns the user agent, and you must use that exact same user agent when making requests with those cookies.
Are you using the latest version of the code and making sure the requests you make use the user agent returned by that function?
If so, try what I said before and increase the sleep time at https://github.com/Anorov/cloudflare-scrape/blob/2c9934ad071ffff3333db6153b3083227c65b01c/cfscrape/init.py#L48

I've got the latest function and matched user-agent, your script even manage to get the good cookies 1/2 of the time, but then my request fail. So yeah, my very simple GET request gets caught by CF even with the right cookies, because of the wifi network I'm currently in.
So the wifi's messing with me but I see almost none of that in my browser. It loads the CF bot page more often than before.
To get the CF bot page, the wifi must change my useragent.. randomly.. or what else can it be?

There is probably something else about your network connection or device that Cloudflare is flagging as suspicious. It would probably take quite a bit of work to figure out what it is. They are definitely looking at more than just user agent, and I doubt the wifi connection is doing anything to the user agent. It could be adding or changing some other header though, or it could be part of a network that Cloudflare thinks has a bad reputation.
There isn't much more I can do here, unfortunately, since I'm pretty sure the problems are not being caused by the module.

Wasted so much time on this issue, now back to my home wifi, the module's working perfectly.


KepubifyError: convert EPUB: read source EPUB: parse OPF package: xml: unsupported version "1.1"; only version 1.0 is supported

Get the above error when trying to convert some of my epub to kepub. Can anyone help?

This is golang/go#25755, but I'll probably just replace the version before parsing since EPUBs probably aren't going to depend on XML 1.1 features.


MontyClient instanciation fails

Hey @davidlatwe, thanks for the great library!
There may be something wrong with MontyClient() called without any argument, as it fails when a .monty.storage file already exists.
Take such a file:
import montydb

montydb.MontyClient()

Run it twice and you should get this:
$ python issue.py
$ # no error yet
$ python issue.py
Traceback (most recent call last):
  File "issue.py", line 3, in <module>
    montydb.MontyClient()
  File ".venv/lib/python3.9/site-packages/montydb/client.py", line 50, in __init__
    self.__options = ClientOptions(options, wconcern)
  File ".venv/lib/python3.9/site-packages/montydb/base.py", line 205, in __init__
    self.__codec_options = bson.parse_codec_options(options)
TypeError: 'NoneType' object is not callable

If this is "normal", maybe an explicit error would make sense here. :)
For the context, Mongo-Thingy is an ODM that supports Monty as a backend. One of our users tried to use Monty and got stuck with this issue: https://github.com/Refty/mongo-thingy/issues/48

Hi @ramnes , thanks for the kind words :)
Yes, that indeed is a bug. I've added a test case for it and should be fixed now.
Could you have a test with the current master branch and confirm the issue has been resolved?
Thanks :)

yep, that works :)

Thanks! Will make a release shortly, before the end of this week. 🍻


[Feature Request] improve docs website seo

Current Behavior

Pooer seo
Desired Behavior

Better seo
Screenshots / Mockups

Alternatives

Already good.


Include compilation instructions on README.md

Include compilation instructions on README.md

Over-seeded by #13


Convert the left navigation topics into links

Currently, the left navigation topics like Records, Functions are not directing the user to the relevant section, but the breadcrumbs do.
So it is inconvenient as we don't have a way to see a whole section directly. So convert the left navigation topics into links

Not valid anymore with new api docs design.


SDK works on old iPhones

According to SDK limitation, only device with A12 to the latest chips supports SDK.
But I was able to run SDK on iPhone 6 and iPhone X.

Hi @bibash28 have you tested all proof generation flow? thanks

Nope.

I downloaded circuits, authenticated, and added claims. But I have not tested proof properly...

Hello @rauljareno ,
This is the first step of verification,
{
  "id": "fe581ff0-f591-4b8a-a0c0-a499b0a597b0",
  "typ": "application/iden3comm-plain-json",
  "type": "https://iden3-communication.io/authorization/1.0/request",
  "thid": "fe581ff0-f591-4b8a-a0c0-a499b0a597b0",
  "body": {
    "callbackUrl": "https://self-hosted-demo-backend-platform.polygonid.me/api/callback?sessionId=412207",
    "reason": "test flow",
    "scope": [
      {
        "id": 1,
        "circuitId": "credentialAtomicQuerySigV2",
        "query": {
          "allowedIssuers": [
            "*"
          ],
          "context": "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json-ld/kyc-v3.json-ld",
          "credentialSubject": {
            "birthday": {
              "$lt": 20000101
            }
          },
          "type": "KYCAgeCredential"
        }
      }
    ]
  },
  "from": "did:polygonid:polygon:mumbai:2qH7XAwYQzCp9VfhpNgeLtK2iCehDDrfMWUCEg5ig5"
}

How are we evaluating proof type from above data?

step 1. Convert the json message to an valid object
Future<Iden3MessageEntity> getIden3Message({required String message});
step 2. Authenticate using the iden3message and valid credential to generate the proof
Future<void> authenticate({     required Iden3MessageEntity message,     required String genesisDid,     BigInt? profileNonce,     required String privateKey,     String? pushToken,   })

Hello @rauljareno ,
I saw this screen. Is this hard-coded? Or how it is generated - cryptographic proof?

this screen is created based on the iden3messageEntity object, it's simple UI

Thanks for sharing..
But developers should know what type of object produces different results. Also, mapping also needs to be known. For example, I guess the circuit id is mapped to the signature type.

thanks for your thoughts @bibash28 Any feedback is welcomed and we will have it in mind for future releases :)

@bibash28 btw, could you share the repository where you were able to add support for old iphones? thanks

Sure..
https://github.com/TalaoDAO/AltMe


Structure changed to reflect foundations as separate label - OSSP-legend.js

This PR contains below changes,

Added JSON info  specifically for all  foundation projects.
Label contents limited to, Id and URL in OSSP-legend.js

@panickervinod  @sumodgeorge  @asa1997
Please check this request and share your comments.

@asa1997
Please check this PR and share your feedback.
@sumodgeorge


Octanify

Fast forwarding into 2021.
I'll most likely have to break this up into multiple pieces, I just wanted to check if this is the right direction.
Features

Added subtle drop shadow
Disable CSS animations if a client requests it

Breaking

Does not work with Ember < 3.4
Does change CSS class names and variables to be a bit more sensible
Does away with @zIndex on the container, replaces it with a CSS variable (Picked from #272)
Changes the way icons can be replaced. Consuming apps can now override the icon components directly

Closing in favor of #320 and upcoming PRs to make this easier to reason about.


Ion-c ionWriter missing field_name doesn't throw exception

Description
This issue links to #197.
Issue summary: For scalar value within a struct, it assigns $0 to field_name of this value if the field_name isn't set. It's supposed to throw an exception.

This issue only happen for 'event stream' that only used for cli tool. I added field_name check in ion-c-cli.
If an event is inside a struct but doesn't give a valid field_name, then ion-c-cli will throw an exception.

Example:
After this change, it will detect invalid field_name within a struct.
File:
$ion_event_stream
{
  event_type: CONTAINER_START,
  ion_type: STRUCT,
  depth: 0
}
{
  event_type: SCALAR,
  ion_type: INT,
  field_name: {
	text: "test"
  },
  value_text: "1",
  value_binary: [
    224,
    1,
    0,
    234,
    33,
    1
  ],
  depth: 1
}
{
  event_type: SCALAR,
  ion_type: INT,
  //no field_name here
  value_text: "1",
  value_binary: [
    224,
    1,
    0,
    234,
    33,
    1
  ],
  depth: 1
}
{
  event_type: CONTAINER_END,
  ion_type: STRUCT,
  depth: 0
}
{
  event_type: STREAM_END,
  depth: 0
}

Output:
Error report:
{
  error_type: STATE,
  message: "/Users/cheqianh/Desktop/ion-c/ion-c/tools/events/ion_event_stream.cpp:1177 : IERR_INVALID_STATE: Field name in struct cannot be null.",
  location: "c",
  event_index: 2
}

Event stream:
{
  test: 1


document the cocli template format

There has to be clear documentation around the template format used by:

CoRIM
Meta
CoMID
(Co)SWID

hey @thomas-fossati
I wanted to check if this issue is still open and if any progress has been made. If the issue is unresolved, I would like to contribute to addressing it. Please let me know if I can start working on this and if there are any specific guidelines or priorities to consider.

@ravjot07 your contributions are welcome and greatly appreciated. This is not actively worked on.

Moved to cocli repo's issues https://github.com/veraison/cocli/issues/18


'RedisConnection' object has no attribute 'publish'

AIOREDIS: Version: 1.3.1
I'm trying to use a connection pool to do pub/sub for a websocket server. I have used example code for the subscribe but I am having trouble with publish. In my AIOHTTP main.py I have:
redis_pool = await create_pool((host, port),
                                       password=redis_pass)
app['redis'] = redis_pool

And I have a test route with:
async def redis_test(request):
    test_data = {
        'hello': 'world'
    }
    with await request.app['redis'] as conn:
        conn.publish('user:8', ujson.dumps(test_data))
    #await request.app['redis'].publish('user:8', ujson.dumps(test_data))
    response = web.Response(body='test')
    return response

But I get: 'RedisConnection' object has no attribute 'publish'

Hi! As far as I can tell, ConnectionsPool doesn't implement Redis commands per se. Try using create_redis_pool instead of create_pool. In this case you'll get your pool wrapped with Redis interface.

You may want to have a look at this: https://github.com/aio-libs/aioredis/issues/588

Yea you'll want to make sure assert type(conn) == Redis or type(conn) == ContextRedis. Follow what 0xfadeef said (or the docs) and you should be good to go.

This issue should be resolved as of #891 - please feel free to pull in the latest master and test to ensure this is the case.


Autodiscovery Tuya TS011F_plug_3

Is it possible to add also the TS011F_plug_3 also to autodiscovery. Probably the same asTS011F_plug_1

It is the same, with other firmware indeed

I have added the alias. Will be in next release.


Add PL translations to Android (Fastlane) and Android components

Hi!
I added some translations in Polish.
I'm sorry I couldn't find a way to share a direct link but I can provide a json report :)

I can confirm your changes, thank you for contributing! :)


ADD NewsFeed sample

base branch
cc/ @zzarcon

[Current coverage][cc-pull] is 98.27%

Merging [#73][cc-pull] into [master][cc-base-branch] will not change coverage

@@             master        #73   diff @@
==========================================
  Files             8          8
  Lines           406        406
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits            399        399
  Misses            7          7
  Partials          0          0

[][cc-pull]

Powered by Codecov. Last updated by [9605d06...cee3557][cc-compare]
[cc-base-branch]: https://codecov.io/gh/devlucky/Kakapo/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/devlucky/Kakapo/compare/9605d06f3c9e0c6afd42547b86c428fa63f3c888...cee35578b831e59394c92665926000fc0373b970
[cc-pull]: https://codecov.io/gh/devlucky/Kakapo/pull/73?src=pr


google recaptcha doesn't work in china.

google recaptcha doesn't work in china. is there an alternative? thanks

https://github.com/lepture/captcha

@lepture How do I use this along side with flask-wtf? Do you have an example?


Update eclipse CobiGen_Templates project after upgrading

Expected behavior
As a CobiGen Eclipse user, after the upgrade from monolithic to template-set, I want the CobiGen_Templates project in Eclipse to be mapped (changed) accordingly to the upgraded structure.
Actual behavior
After the upgrade, CobiGen_Templates will be ignored; instead, Eclipse will use the template-set's path.
Steps to reproduce (bug) / Use Case of feature request (enhancement)

Import a monolithic CobiGen_templates project in Eclipse.
Execute CobiGen -> generate on any input file.
A warning message will be presented, choose "upgrade".

Related/Dependent Issues
#1518

That sounds like on odd behavior of the upgrade. The upgrade should upgrade the current configuration folder, which could also be the cobigen_templates in case you have it imported in eclipse


Add react-a11y-image-button-has-alt rule

Hi @t-ligu, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (Liubin Guo). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

This was an easy one :)
Once you write a few rules then you become very fast at writing new ones, right?