Skip to content

Commit

Permalink
feat(core): dynamically update script.js based on user configuration (#…
Browse files Browse the repository at this point in the history
…119)

* feat: convert to array of script features

* feat: tracker choices send patch request from client

* feat: serve script file dynamically off runtime config

* perf: move script files to the hot path

* fix(core): update request object when modifying script path as well
  • Loading branch information
ayuhito authored Aug 12, 2024
1 parent d6e907d commit c780c0b
Show file tree
Hide file tree
Showing 14 changed files with 217 additions and 177 deletions.
Binary file modified bun.lockb
Binary file not shown.
4 changes: 0 additions & 4 deletions core/api/oas_defaults_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 28 additions & 50 deletions core/api/oas_json_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

88 changes: 21 additions & 67 deletions core/api/oas_schemas_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 22 additions & 4 deletions core/api/oas_validators_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (s *StartCommand) Run(ctx context.Context) error {
mux.Handle("/api/", http.StripPrefix("/api", apiHandler))

// SPA client.
err = services.SetupAssetHandler(mux)
err = services.SetupAssetHandler(mux, service.RuntimeConfig)
if err != nil {
return errors.Wrap(err, "failed to setup asset handler")
}
Expand Down
8 changes: 5 additions & 3 deletions core/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1455,9 +1455,11 @@ components:
enum: [en]
default: en
script_type:
type: string
enum: [default, tagged-events]
default: default
type: array
items:
type: string
enum: [default, tagged-events]
uniqueItems: true
UserGet:
type: object
title: UserGet
Expand Down
Loading

0 comments on commit c780c0b

Please sign in to comment.