-
Notifications
You must be signed in to change notification settings - Fork 31
feat: create sdk-server-edge package #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
yusinto
merged 17 commits into
main
from
yus/sc-197407/refactor-common-edge-function-code
Apr 18, 2023
Merged
Changes from 13 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
0120c12
feat: improved the cloudflare LDClient type. Fixed typedoc completely…
yusinto 95d6b3c
fix: broken waitForInitialization link
yusinto 7862d48
chore: moved shared code to shared/sdk-server-edge-function
yusinto 9a6e98e
chore: add platformInfo to typedoc
yusinto b7a4957
chore: move common code to shared-server-edge. refactored cloudflare …
yusinto 2279d27
test: support track, initialized and close. add unit tests for unsupp…
yusinto 80c26dc
chore: enable sendEvents and fix hanging unit tests.
yusinto 9bd7005
fix: change build target commonjs
yusinto ce8ca0d
chore: cleanup readme and changelog. Changed EdgeFunction* to just Edge*
yusinto 9cab101
chore: add ci
yusinto fc842cc
feat: include all ldClient functions. Set sendEvents to false.
yusinto c5930ac
fix: remove unused import
yusinto 59f32fc
fix: support logger as an option. validate options before constructor…
yusinto 9f90b1f
chore: improve docs. start validation of public options.
yusinto acbc4df
test: added validateOptions function and unit tests.
yusinto 625ba97
fix: improved typedoc
yusinto c782e71
Merge branch 'main' into yus/sc-197407/refactor-common-edge-function-…
yusinto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: shared/sdk-server | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths-ignore: | ||
| - '**.md' #Do not need to run CI for markdown changes. | ||
| pull_request: | ||
| branches: [main] | ||
| paths-ignore: | ||
| - '**.md' | ||
|
|
||
| jobs: | ||
| build-test-sdk-server: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: 16 | ||
| registry-url: 'https://registry.npmjs.org' | ||
| - id: shared | ||
| name: Shared CI Steps | ||
| uses: ./actions/ci | ||
| with: | ||
| workspace_name: '@launchdarkly/js-server-sdk-common-edge' | ||
| workspace_path: packages/shared/sdk-server-edge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| { | ||
| "name": "@launchdarkly/cloudflare-server-sdk", | ||
| "version": "0.0.1", | ||
| "description": "LaunchDarkly Server-Side SDK for Cloudflare workers", | ||
| "description": "Cloudflare LaunchDarkly SDK", | ||
| "packageManager": "[email protected]", | ||
| "keywords": [ | ||
| "launchdarkly", | ||
|
|
@@ -11,22 +11,22 @@ | |
| ], | ||
| "main": "./dist/src/index.js", | ||
| "types": "./dist/src/index.d.ts", | ||
| "type": "module", | ||
| "files": [ | ||
| "/dist" | ||
| ], | ||
| "scripts": { | ||
| "doc": "../../../scripts/build-doc.sh .", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is useful for local dev. |
||
| "build": "rimraf dist && yarn tsc", | ||
| "tsw": "yarn tsc --watch", | ||
| "start": "rimraf dist && yarn tsw", | ||
| "lint": "eslint . --ext .ts", | ||
| "prettier": "prettier --write '**/*.@(js|ts|tsx|json|css)' --ignore-path ../../../.prettierignore", | ||
| "test": "NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" jest --ci --runInBand --coverage", | ||
| "check": "yarn prettier && yarn lint && yarn tsc && yarn test" | ||
| "check": "yarn prettier && yarn lint && yarn build && yarn test && yarn doc" | ||
| }, | ||
| "dependencies": { | ||
| "@cloudflare/workers-types": "^4.20230321.0", | ||
| "@launchdarkly/js-server-sdk-common": "0.2.0", | ||
| "@launchdarkly/js-server-sdk-common-edge": "0.0.1", | ||
| "crypto-js": "^4.1.1" | ||
| }, | ||
| "devDependencies": { | ||
|
|
||
6 changes: 3 additions & 3 deletions
6
...createLDClient/createFeatureStore.test.ts → ...cloudflare/src/createFeatureStore.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
.../src/createLDClient/createFeatureStore.ts → .../sdk/cloudflare/src/createFeatureStore.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
packages/sdk/cloudflare/src/createLDClient/CloudflareImpl.ts
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
packages/sdk/cloudflare/src/createLDClient/createOptions.test.ts
This file was deleted.
Oops, something went wrong.
67 changes: 0 additions & 67 deletions
67
packages/sdk/cloudflare/src/createLDClient/createOptions.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.