quonfig 0.0.14 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,14 +11,16 @@ module Quonfig
11
11
  # <datadir>/configs/*.json
12
12
  # <datadir>/feature-flags/*.json
13
13
  # <datadir>/segments/*.json
14
- # <datadir>/schemas/*.json
15
14
  # <datadir>/log-levels/*.json
16
15
  #
16
+ # schemas/ is intentionally excluded — those files are raw JSON Schema
17
+ # documents, not Configs, and SDKs do not consume them (qfg-uzsl).
18
+ #
17
19
  # Each <type>/*.json file is a WorkspaceConfigDocument. The loader projects
18
20
  # it down to the ConfigResponse shape that the SSE/HTTP delivery path emits,
19
21
  # so ConfigStore consumes both transports uniformly.
20
22
  module Datadir
21
- CONFIG_SUBDIRS = %w[configs feature-flags segments schemas log-levels].freeze
23
+ CONFIG_SUBDIRS = %w[configs feature-flags segments log-levels].freeze
22
24
 
23
25
  module_function
24
26
 
@@ -36,7 +38,10 @@ module Quonfig
36
38
  .select { |name| name.end_with?('.json') }
37
39
  .sort
38
40
  .each do |filename|
39
- raw = JSON.parse(File.read(File.join(dir, filename)))
41
+ path = File.join(dir, filename)
42
+ raw = JSON.parse(File.read(path))
43
+ raise ArgumentError, "[quonfig] config has empty key — file is not a Quonfig Config: #{path}" if raw['key'].nil? || raw['key'].to_s.empty?
44
+
40
45
  configs << to_config_response(raw, env_id)
41
46
  end
42
47
  end