avohq / avo Goto Github PK
View Code? Open in Web Editor NEWThe command-line interface for Avo
Home Page: https://www.avo.app
The command-line interface for Avo
Home Page: https://www.avo.app
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
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.
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!
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
Could you release new version with this vulnerabilities fixed? ππ»
thanks in advance
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
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"
}
]
}
Hi
When connecting Avo( For Web) I get two errors:
I used dependencies
avo: 3.2.6
mixpanel-browser: 2.45.0
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!
Python
Codegen file
init_avo
avo --version
3.2.2
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?
I'm getting the error from:
avo > update-notifier > configstore > dot-prop
and avo > configstore > dot-prop
https://www.npmjs.com/advisories/1213
Can you please release new version that patches this vulns?
Thanks
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.
The generated props for initAvo
aren't matching with the docs reference
export function initAvo(
options: {...init options},
destinationOptions: any,
OtherDestination: CustomDestination,
) {
Avo.initAvo(
options: { ...init options },
systemProperties?: {
systemProperty0: number;
systemProperty1: boolean;
...},
destinationOptions?: any,
interfaceDestination?: CustomDestination,
otherInterfaceDestination?: CustomDestination,
...Destination?: CustomDestination
avo --version
2.0.2
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.