Skip to content
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
cb6dd00
wip
dylanvorster Aug 5, 2024
86142ce
minor changes to get rn-sb-todo working.
Chriztiaan Aug 7, 2024
3b3534f
Passing sourcemap flag to tsc instead of webpack. Added changesets en…
Chriztiaan Aug 7, 2024
c7f4088
Dev release of support packages.
Chriztiaan Aug 12, 2024
77589b8
Multiplatform prompt support for creating lists and todos.
Chriztiaan Aug 15, 2024
e1b254b
Multiplatform alert/confirm support.
Chriztiaan Aug 15, 2024
c463e3b
Introduced multi platform alert and prompt implementations. Got stora…
Chriztiaan Aug 19, 2024
b5d0383
PoC with public path workers. Using separate webpack files.
Chriztiaan Aug 21, 2024
c9788f6
Nuked public dir
Chriztiaan Aug 22, 2024
8335bd6
Moved workers back to their original dirs.
Chriztiaan Aug 22, 2024
5e65431
Minor documentation for react-native-web. Cleaned up worker bundling …
Chriztiaan Aug 26, 2024
8765494
Changed worker path flag to workers object that allows independent pa…
Chriztiaan Aug 27, 2024
5ae3377
Using SqlOpenOptions instead of web-sql-flags to configure custom wor…
Chriztiaan Sep 2, 2024
118a5a5
Merge branch 'main' into react-native-web-christiaan
Chriztiaan Sep 2, 2024
e4ee2b9
Changeset message.
Chriztiaan Sep 2, 2024
fa806be
Lock file.
Chriztiaan Sep 2, 2024
e3c76c3
Moved sharedSyncWorker config to a sync option on the web PowerSyncDa…
Chriztiaan Sep 2, 2024
e295b30
Merged shared and dedicated db worker into one worker file.
Chriztiaan Sep 4, 2024
81ce61d
Fixed bson issue that was breaking single tab mode.
Chriztiaan Sep 5, 2024
01ca78f
Passing flag options to worker factory method. Renamed webpack worker…
Chriztiaan Sep 6, 2024
e4f430f
WIP prod builds
Chriztiaan Sep 9, 2024
835a19e
Updated copy-files script to target `public/@powersync`. Webpack now …
Chriztiaan Sep 9, 2024
cf0e1c7
Merge branch 'main' into react-native-web-christiaan
Chriztiaan Sep 10, 2024
a8073a7
Update changeset entry.
Chriztiaan Sep 10, 2024
a85856d
Git ignore rule for public/@powersync
Chriztiaan Sep 10, 2024
d06b14a
Dropped node copy script in favour of a bash copy command.
Chriztiaan Sep 11, 2024
95a3562
Changed worker factory signature to return Worker or SharedWorker, in…
Chriztiaan Sep 11, 2024
de10a56
Updated /web package.json.
Chriztiaan Sep 11, 2024
cf56889
wip
Chriztiaan Sep 11, 2024
2b74ae3
Worker factory method now takes in a wider set of options instead of …
Chriztiaan Sep 11, 2024
927ac56
Updated readme to indicate use of options over flags in worker factor…
Chriztiaan Sep 11, 2024
dad54b3
Updated readme entry regarding environment setup.
Chriztiaan Sep 11, 2024
4fb9087
E2E instructions to run the RN web demo
benitav Sep 12, 2024
6d47461
Some light readme restructuring and polish
benitav Sep 12, 2024
79ec0ac
fix heading hierarchy
benitav Sep 12, 2024
fee3d43
Wording polish of UMD target
benitav Sep 12, 2024
322d37f
Moved away from Partial options for the worker factory method.
Chriztiaan Sep 12, 2024
05bdacb
Merge branch 'react-native-web-christiaan' of github.com:powersync-ja…
Chriztiaan Sep 12, 2024
537ab8f
Renamed "Require" interfaces to "Resolved.
Chriztiaan Sep 12, 2024
0c4da76
Readme polish
benitav Sep 16, 2024
97c285a
Simplify readme - migrate config instructions to docs
benitav Sep 16, 2024
ccc9a5c
Merge branch 'main' into react-native-web-christiaan
Chriztiaan Sep 16, 2024
0b2b177
Using ResolvedWebSQLFlags instead of WebSQLFlags for ResolvedWebSQLOp…
Chriztiaan Sep 16, 2024
22d6e66
Merge branch 'react-native-web-christiaan' of github.com:powersync-ja…
Chriztiaan Sep 16, 2024
78f01a9
Add RN web demo to main Readme
benitav Sep 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/light-dots-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@powersync/attachments': patch
'@powersync/common': patch
'@powersync/kysely-driver': patch
'@powersync/react': patch
'@powersync/react-native': patch
---

Updated dependencies.
5 changes: 5 additions & 0 deletions .changeset/two-bats-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@powersync/web': minor
---

DB and sync workers instantiation can now be overriden with a path or a factory method. Added UMD distribution to introduce `react-native-web` support (available under `@powersync/web/umd`).
31 changes: 25 additions & 6 deletions demos/react-native-supabase-todolist/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ PODS:
- hermes-engine (0.74.5):
- hermes-engine/Pre-built (= 0.74.5)
- hermes-engine/Pre-built (0.74.5)
- powersync-sqlite-core (0.1.6)
- powersync-sqlite-core (0.2.1)
- RCT-Folly (2024.01.01.00):
- boost
- DoubleConversion
Expand Down Expand Up @@ -1005,11 +1005,30 @@ PODS:
- React-debug
- react-native-encrypted-storage (4.0.3):
- React-Core
- react-native-quick-sqlite (1.1.8):
- powersync-sqlite-core (~> 0.1.6)
- react-native-quick-sqlite (1.3.1):
- DoubleConversion
- glog
- hermes-engine
- powersync-sqlite-core (~> 0.2.1)
- RCT-Folly (= 2024.01.01.00)
- RCTRequired
- RCTTypeSafety
- React
- React-callinvoker
- React-Codegen
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- react-native-safe-area-context (4.10.5):
- React-Core
- React-nativeconfig (0.74.5)
Expand Down Expand Up @@ -1590,7 +1609,7 @@ SPEC CHECKSUMS:
fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120
glog: fdfdfe5479092de0c4bdbebedd9056951f092c4f
hermes-engine: 8c1577f3fdb849cbe7729c2e7b5abc4b845e88f8
powersync-sqlite-core: 4c38c8f470f6dca61346789fd5436a6826d1e3dd
powersync-sqlite-core: 38ead13d8b21920cfbc79e9b3415b833574a506d
RCT-Folly: 02617c592a293bd6d418e0a88ff4ee1f88329b47
RCTDeprecation: 3afceddffa65aee666dafd6f0116f1d975db1584
RCTRequired: ec1239bc9d8bf63e10fb92bd8b26171a9258e0c1
Expand All @@ -1616,7 +1635,7 @@ SPEC CHECKSUMS:
React-logger: 257858bd55f3a4e1bc0cf07ddc8fb9faba6f8c7c
React-Mapbuffer: 6c1cacdbf40b531f549eba249e531a7d0bfd8e7f
react-native-encrypted-storage: db300a3f2f0aba1e818417c1c0a6be549038deb7
react-native-quick-sqlite: 7ad498d81c8506803da2e1c2b64c8cb7758e04cb
react-native-quick-sqlite: a6c078a8260d0df2b2c53ca9e33f96b93ca5c414
react-native-safe-area-context: a240ad4b683349e48b1d51fed1611138d1bdad97
React-nativeconfig: ba9a2e54e2f0882cf7882698825052793ed4c851
React-NativeModulesApple: 8d11ff8955181540585c944cf48e9e7236952697
Expand Down Expand Up @@ -1647,7 +1666,7 @@ SPEC CHECKSUMS:
RNScreens: b32a9ff15bea7fcdbe5dff6477bc503f792b1208
RNVectorIcons: 2a2f79274248390b80684ea3c4400bd374a15c90
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
Yoga: 950bbfd7e6f04790fdb51149ed51df41f329fcc8
Yoga: 2246eea72aaf1b816a68a35e6e4b74563653ae09
ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5

PODFILE CHECKSUM: bc0290fe498e12305d84bb656e108a3ff9f829ea
Expand Down
6 changes: 6 additions & 0 deletions demos/react-native-web-supabase-todolist/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Replace the credentials below with your Supabase, PowerSync and Expo project details.
EXPO_PUBLIC_SUPABASE_URL=https://foo.supabase.co
EXPO_PUBLIC_SUPABASE_ANON_KEY=foo
EXPO_PUBLIC_SUPABASE_BUCKET= # Optional. Only required when syncing attachments and using Supabase Storage. See packages/powersync-attachments.
EXPO_PUBLIC_POWERSYNC_URL=https://foo.powersync.journeyapps.com
EXPO_PUBLIC_EAS_PROJECT_ID=foo # Optional. Only required when using EAS.
38 changes: 38 additions & 0 deletions demos/react-native-web-supabase-todolist/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files

# dependencies
node_modules/

# Expo
.expo/
dist/
web-build/

# Native
*.orig.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision

# Metrom
.metro-health-check*

# debug
npm-debug.*

# macOS
.DS_Store
*.pem

# local env files
.env*.local

# typescript
*.tsbuildinfo

# IDE
.vscode
.fleet
.idea
1 change: 1 addition & 0 deletions demos/react-native-web-supabase-todolist/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# react-native-web-supabase-todolist
121 changes: 121 additions & 0 deletions demos/react-native-web-supabase-todolist/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
Creative Commons Legal Code

CC0 1.0 Universal

CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.

Statement of Purpose

The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").

Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.

For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.

1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:

i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.

2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.

3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.

4. Limitations and Disclaimers.

a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.
Loading
Loading