GithubHelp home page GithubHelp logo

avo's People

Contributors

aleks-tpom6oh avatar arnihermann avatar bragur avatar dependabot[bot] avatar hugihlynsson avatar klaraavo avatar kristleifur avatar logason avatar yjhuoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

yjhuoh

avo's Issues

Found 4 moderate severity vulnerabilities

Paths:

  • avo > inquirer-fuzzy-path > inquirer > string-width > strip-ansi > ansi-regex
  • avo > inquirer-fuzzy-path > inquirer > strip-ansi > ansi-regex
  • avo > yurnalist > strip-ansi > ansi-regex
  • avo > inquirer-fuzzy-path > strip-ansi > ansi-regex

GHSA-93q8-gq69-wqmw

Could you release new version with this vulnerabilities fixed? πŸ™πŸ»

thanks in advance

Pull from another branch doesn't pull events

Hello,

I am experiencing another problem. We have multiple branches on avo, including main and test. On the main branch, we have only configured some settings but have not added any events yet. Meanwhile, on the test branch, we have some events.

Currently, I am on the main branch and attempting to pull events from the test branch using the following command:

avo pull --branch test -f

However, this command is not successfully pulling events from the test branch (Avo interface is still empty - I'm working on Android app).

Please note that I configured sources on the main branch after adding events on the test branch, and subsequently merged main into test.

Have to use `sudo`

Hello,

I have more of a question than an issue.
Whenever I try to use the command npm install -g avo I need to use sudo which means that all subsequent avo commands also need to be run with sudo.
Consequently, all files downloaded using the avo CLI are owned by the root owner, which makes it impossible for me to modify them.

What should I do in this case? Is this behavior intentional?

Thanks in advance

Error when running init_avo codegen file.

Language: Python

Error in: Codegen file

Method: init_avo

Version:

 avo --version
3.2.2

Description:

I just pulled via avo-cli and it changed the implementation of init_avo method in the generated file.
Before it was:

            if "apiKey" in inspect.getfullargspec(global_amplitude.make).args:

Now:

            if "apiKey" in inspect.getargspec(global_amplitude.make).args:

This causes the method to raise this error:

Traceback (most recent call last):
  File "/Users/magtastic/.config/.pyenv/versions/3.10.4/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/magtastic/.config/.pyenv/versions/3.10.4/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/magtastic/Developer/Smitten/api/server/server.py", line 44, in <module>
    avo.init_avo(
  File "/Users/magtastic/Developer/Smitten/api/server/core/avo.py", line 269, in init_avo
    if "apiKey" in inspect.getargspec(global_amplitude.make).args:
  File "/Users/magtastic/.config/.pyenv/versions/3.10.4/lib/python3.10/inspect.py", line 1245, in getargspec
    raise ValueError("Function has keyword-only parameters or annotations"
ValueError: Function has keyword-only parameters or annotations, use inspect.signature() API which can support them
make[1]: *** [run_server] Error 1

If I manually edit the generated file to use the older getfullargspec method, everything works fine.

How I call the method:

amplitude_destination = AmplitudeDestination()
AVO_ENV = "prod" if APP_CONFIG.get("ENVIRONMENT", None) == "prod" else "dev"
avo.init_avo(
    options={"env": AVO_ENV, "strict": True, "verbose": True},
    amplitude=amplitude_destination,
)

Did this change recently?

[TypeScript] initAvo props not matching with docs reference

The generated props for initAvo aren't matching with the docs reference

Generated functionπŸ‘‡πŸ½

export function initAvo(
  options: {...init options},
  destinationOptions: any,
  OtherDestination: CustomDestination,
) {

Avo docs reference πŸ‘‡πŸ½

Link to docs

Avo.initAvo(
  options: { ...init options },
  systemProperties?: {
    systemProperty0: number;
    systemProperty1: boolean;
    ...},
  destinationOptions?: any,
  interfaceDestination?: CustomDestination,
  otherInterfaceDestination?: CustomDestination,
  ...Destination?: CustomDestination
avo --version 
2.0.2

Cannot install avo globally on windows

Hey,
I have an issue where I cannot install Avo on windows. I get this error message:
image

This issue has been occurring on multiple machines running windows os so it's reproducible.
Do you need any other information to try to solve this issue?

[Android][Kotlin] status command not reporting usages with non-default filename

Hello together,

We are planning to use avo code generation to simplify tracking and to make it easier to see if all events have been implemented.

When I use a path like service-tracking/src/main/java/com/example/service/tracking/avo/Avo.k the status of event usages is correctly reported.

❯ avo status
info Currently on branch 'main'
└─ Android (service-tracking/src/main/java/com/example/service/tracking/avo/Avo.kt)
   β”œβ”€ appClosed
   β”‚  └─ βœ– no usage found
   β”œβ”€ appInstalled
   β”‚  └─ βœ– no usage found
   β”œβ”€ appOpened
   β”‚  └─ βœ– no usage found
   β”œβ”€ appViewedBookPlan
   β”‚  └─ βœ– no usage found
   β”œβ”€ appViewedStationDetail
   β”‚  └─ βœ– no usage found
   └─ appViewedStationPreview
      └─ used in app/src/main/java/com/example/PreviewFragment.kt: 1 time
info 1 of 6 events seen in code
error 5 missing events
└─ Android (service-tracking/src/main/java/com/example/service/tracking/avo/Avo.kt)
   β”œβ”€ appClosed: no usage found
   β”œβ”€ appInstalled: no usage found
   β”œβ”€ appOpened: no usage found
   β”œβ”€ appViewedBookPlan: no usage found
   └─ appViewedStationDetail: no usage found

When changed to service-tracking/src/main/java/com/example/service/tracking/generated/MyTracker.kt none of the usages is reported anymore, all events are marked as missing.

❯ avo status
info Currently on branch 'main'
└─ Android (service-tracking/src/main/java/com/example/service/tracking/generated/MyTracker.kt)
   β”œβ”€ appClosed
   β”‚  └─ βœ– no usage found
   β”œβ”€ appInstalled
   β”‚  └─ βœ– no usage found
   β”œβ”€ appOpened
   β”‚  └─ βœ– no usage found
   β”œβ”€ appViewedBookPlan
   β”‚  └─ βœ– no usage found
   β”œβ”€ appViewedStationDetail
   β”‚  └─ βœ– no usage found
   └─ appViewedStationPreview
      └─ βœ– no usage found
info 0 of 6 events seen in code
error 6 missing events
└─ Android (service-tracking/src/main/java/com/example/service/tracking/generated/MyTracker.kt)
   β”œβ”€ appClosed: no usage found
   β”œβ”€ appInstalled: no usage found
   β”œβ”€ appOpened: no usage found
   β”œβ”€ appViewedBookPlan: no usage found
   β”œβ”€ appViewedStationDetail: no usage found
   └─ appViewedStationPreview: no usage found

Used command:
avo status

Could you take a look into that?

Thanks

avo.json

{
  "avo": {
    "version": 2
  },
  "schema": {
    "id": "XXX",
    "name": "XX"
  },
  "branch": {
    "id": "master",
    "name": "main"
  },
  "force": false,
  "sources": [
    {
      "id": "XX",
      "name": "Android",
      "path": "service-tracking/src/main/java/com/example/service/tracking/generated/MyTracker.kt",
      "actionId": "XXX",
      "branchId": "master",
      "updatedAt": "2022-07-05T13:42:53.000Z"
    }
  ]
}

Feature request: Add export of avo event names to codegen output

Summary

We are using typescript in one of our projects and would love to get an list of available avo event names included in the codegen output.

Currently we are deducing the list of avo event names from the trigger functions with some typescript template literal type helpers:

const { initAvo, View, AvoEnv, LogType, EventName, ClickTarget, avoInspectorApiKey, ...events } =
  avo;

type AvoEventName = CamelCaseToSnakeCase<keyof typeof events>;

Our solution is fine, if the event names always stay the same as the function names but just in a different casing. If this connection changes, our solution will break.

--forceFeatures flags seem to have no effect on the generated code.

I'm trying to use some of the --forceFeatures flags like SwiftTrackInterface and SplitSwiftFiles but they seem to have no effect on the generated code, even though the CLI tool tells me that they were enable successfully:

info Pulling from branch 'add-ios-client'
success Feature 'SwiftTrackInterface' force enabled successfully
success Feature 'SplitSwiftFiles' already enabled in your workspace
success Analytics wrapper successfully updated
└─ iOS
   └─ Avo.swift

The outputted file is always the same wether I remove the feature flags or not, it doesn't seem to split the files, nor to generate an interface at the path I specified.

Relatedly, the documentation mention that the generated code should include an interface file with all the events for Kotlin and Swift: https://www.avo.app/docs/implementation/guides/avo-and-unit-tests#unit-tests-in-kotlin-and-swift

This doesn't seem to be the case either, this interface is nowhere to be found.

Any help would be appreciated!

Issue with avo login - Cannot destructure property 'body' of 'response' as it is undefined

I ran into an issue with login through CLI (avo login), I get this error:
error Cannot destructure property 'body' of 'response' as it is undefined.
It looks like you have already smth similar on your radar (#380) for the case when we run avo installation. The error is the same, so I believe the problem is too, but I didn't see any mention of this particular case.

Also I should mention that when I run that command meanwhile it shows a webpage that proposes to login with my email, but when I click the button it redirects to localhost:9005 where is nothing (I guess if the script didn't exit with error it should create smth on port 9005)

Thanks!

Run avo pull on CI

Hi,

is there a way to login using environment variables or something similar to allow us to run avo pull on our CI system?

We would like to automate updates of our tracking code.

Thanks for your help

[TypeScript] Optional event properties are typed as "null | undefined"

Event properties set as optional ("Sometimes sent") on the platform are typed as "null | undefined"

Eg.

export interface ExampleEventProperties {
   name: string;
   city: string | null | undefined;
}

Such approach makes tsc complain, when a "optional prop" isn't specified at the generated function

 Avo.exampleEvent({
     name: "John",
  }),

// tsc complains saying "Property 'city' is missing in type ...."

This issue could be solved setting the prop as optional using the question mark prop?: {type}

export interface ExampleEventProperties {
   name: string;
   city?: string;
}
avo --version
2.0.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.