parse-stack-next 5.0.0 → 5.1.0
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.
- checksums.yaml +4 -4
- data/.bundle/config +2 -0
- data/.github/ISSUE_TEMPLATE/bug_report.yml +105 -0
- data/.github/ISSUE_TEMPLATE/feature_request.yml +67 -0
- data/.github/dependabot.yml +13 -0
- data/.github/workflows/codeql.yml +1 -1
- data/.github/workflows/docs.yml +3 -3
- data/.github/workflows/release.yml +43 -0
- data/.github/workflows/ruby.yml +1 -1
- data/.gitignore +1 -0
- data/.vscode/settings.json +3 -0
- data/.yardopts +19 -0
- data/CHANGELOG.md +802 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +8 -5
- data/README.md +16 -1
- data/Rakefile +5 -1
- data/docs/acl_clp_guide.md +553 -0
- data/docs/atlas_vector_search_guide.md +123 -22
- data/docs/client_sdk_guide.md +201 -5
- data/docs/usage_guide.md +21 -0
- data/docs/yard-template/default/fulldoc/html/css/common.css +1222 -0
- data/docs/yard-template/default/fulldoc/html/css/full_list.css +387 -0
- data/lib/parse/agent/tools.rb +153 -1
- data/lib/parse/cache/pool.rb +15 -0
- data/lib/parse/cache/redis.rb +114 -2
- data/lib/parse/client/caching.rb +18 -1
- data/lib/parse/client.rb +79 -12
- data/lib/parse/embeddings/cohere.rb +143 -6
- data/lib/parse/embeddings/provider.rb +20 -2
- data/lib/parse/embeddings/voyage.rb +102 -0
- data/lib/parse/embeddings.rb +332 -1
- data/lib/parse/live_query/client.rb +167 -4
- data/lib/parse/live_query/configuration.rb +12 -0
- data/lib/parse/live_query/subscription.rb +55 -2
- data/lib/parse/live_query.rb +123 -1
- data/lib/parse/lock.rb +342 -0
- data/lib/parse/lock_backend.rb +308 -0
- data/lib/parse/model/classes/audience.rb +5 -0
- data/lib/parse/model/classes/installation.rb +122 -0
- data/lib/parse/model/classes/job_schedule.rb +3 -1
- data/lib/parse/model/classes/job_status.rb +4 -1
- data/lib/parse/model/classes/push_status.rb +4 -1
- data/lib/parse/model/classes/session.rb +7 -0
- data/lib/parse/model/classes/user.rb +204 -0
- data/lib/parse/model/core/create_lock.rb +28 -134
- data/lib/parse/model/core/embed_managed.rb +162 -13
- data/lib/parse/model/core/parse_reference.rb +17 -1
- data/lib/parse/model/core/querying.rb +26 -2
- data/lib/parse/model/file.rb +523 -18
- data/lib/parse/query.rb +31 -1
- data/lib/parse/stack/version.rb +1 -1
- data/lib/parse/stack.rb +98 -1
- data/parse-stack-next.gemspec +2 -2
- metadata +19 -7
|
@@ -224,7 +224,23 @@ module Parse
|
|
|
224
224
|
if respond_to?(:protect_fields) && respond_to?(:class_permissions)
|
|
225
225
|
existing = class_permissions.protected_fields_for("*") rescue []
|
|
226
226
|
merged = (existing + [field_name.to_s]).uniq
|
|
227
|
-
protect_fields
|
|
227
|
+
# Suppress Parse::User's "raw protect_fields called" advisory
|
|
228
|
+
# for this internal auto-install. The advisory exists to nudge
|
|
229
|
+
# app code toward the new master_only_fields/self_visible_fields
|
|
230
|
+
# DSL; the parse_reference auto-install is a different concern
|
|
231
|
+
# and should not trip it at gem boot.
|
|
232
|
+
prior = nil
|
|
233
|
+
if is_a?(Class) && self <= Parse::User
|
|
234
|
+
prior = instance_variable_get(:@_user_field_dsl_active)
|
|
235
|
+
instance_variable_set(:@_user_field_dsl_active, true)
|
|
236
|
+
end
|
|
237
|
+
begin
|
|
238
|
+
protect_fields("*", merged)
|
|
239
|
+
ensure
|
|
240
|
+
if is_a?(Class) && self <= Parse::User
|
|
241
|
+
instance_variable_set(:@_user_field_dsl_active, prior)
|
|
242
|
+
end
|
|
243
|
+
end
|
|
228
244
|
end
|
|
229
245
|
|
|
230
246
|
# Auto-install write-side protection: once the after_create
|
|
@@ -435,10 +435,28 @@ module Parse
|
|
|
435
435
|
# @param fields [Array<String>] specific fields to watch for changes (nil = all fields)
|
|
436
436
|
# @param session_token [String] session token for ACL-aware subscriptions
|
|
437
437
|
# @param client [Parse::LiveQuery::Client] custom LiveQuery client (optional)
|
|
438
|
+
# @param use_master_key [Boolean] per-subscription master-key opt-in.
|
|
439
|
+
# See {Parse::Query#subscribe} for the full description.
|
|
440
|
+
# @yield [subscription] runs the block with the freshly-constructed
|
|
441
|
+
# {Parse::LiveQuery::Subscription} BEFORE the subscribe frame is
|
|
442
|
+
# sent so caller-registered callbacks are wired before any server
|
|
443
|
+
# events can arrive. Optional — callers may still capture the
|
|
444
|
+
# returned subscription and register callbacks later.
|
|
445
|
+
# @example block form (ergonomic, no race window)
|
|
446
|
+
# Post.subscribe(where: { published: true }) do |sub|
|
|
447
|
+
# sub.on(:create) { |obj| puts "new: #{obj.id}" }
|
|
448
|
+
# sub.on(:update) { |obj, prev| puts "updated: #{obj.id}" }
|
|
449
|
+
# end
|
|
450
|
+
# @example capture-then-wire form (equivalent, but has a tiny
|
|
451
|
+
# window between subscribe-frame send and the first .on call
|
|
452
|
+
# where a server event would be dropped if it arrived first)
|
|
453
|
+
# sub = Post.subscribe(where: { published: true })
|
|
454
|
+
# sub.on(:create) { |obj| … }
|
|
438
455
|
# @return [Parse::LiveQuery::Subscription] the subscription object
|
|
439
456
|
# @see Parse::LiveQuery::Subscription
|
|
440
457
|
# @see Parse::Query#subscribe
|
|
441
|
-
def subscribe(where: {}, fields: nil, session_token: nil, client: nil
|
|
458
|
+
def subscribe(where: {}, fields: nil, session_token: nil, client: nil,
|
|
459
|
+
use_master_key: false, &block)
|
|
442
460
|
# Fall through to the ambient set by `Parse.with_session` / `Parse.login`
|
|
443
461
|
# so a caller wrapping a region with `with_session(user) { Klass.subscribe ... }`
|
|
444
462
|
# gets an ACL-aware subscription without re-threading the token.
|
|
@@ -446,7 +464,13 @@ module Parse
|
|
|
446
464
|
ambient = Parse.current_session_token
|
|
447
465
|
session_token = ambient if ambient.is_a?(String) && !ambient.empty?
|
|
448
466
|
end
|
|
449
|
-
query(where).subscribe(
|
|
467
|
+
query(where).subscribe(
|
|
468
|
+
fields: fields,
|
|
469
|
+
session_token: session_token,
|
|
470
|
+
client: client,
|
|
471
|
+
use_master_key: use_master_key,
|
|
472
|
+
&block
|
|
473
|
+
)
|
|
450
474
|
end
|
|
451
475
|
|
|
452
476
|
# Find objects for a given objectId in this collection. The result is a list
|