Skip to content
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

PKG -- [fcl-core] split fcl to fcl-core, fcl, and fcl-react-native #1809

Merged
merged 41 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0c7216d
PKG -- [fcl] rename fcl to fcl-core
nialexsan Nov 15, 2023
6f68a51
PKG -- [root] rename fcl to fcl-core
nialexsan Nov 15, 2023
3b4a3ef
PKG -- [fcl] fcl-core
nialexsan Nov 15, 2023
324b2c1
PKG -- [fcl-react-native] move from fcl
nialexsan Nov 15, 2023
0de9286
PKG -- [fcl-web] move from fcl
nialexsan Nov 15, 2023
83f318d
PKG -- [fcl-core] ts file
nialexsan Nov 15, 2023
d63640a
PKG -- [fcl-core] remove react native peerDeps
nialexsan Nov 15, 2023
182d3db
PKG -- [root] updated lock
nialexsan Nov 15, 2023
1dfc3e2
PKG -- [fcl-wc] fix test
nialexsan Nov 15, 2023
a14a1c2
PKG -- [fcl-wc] remove duplicated utils
nialexsan Nov 15, 2023
ac8aee7
PKG -- [fcl-wc] Fix type imports
nialexsan Nov 15, 2023
9f3ffc7
PKG -- [fcl-wc] Fix paths
nialexsan Nov 15, 2023
9d9980b
PKG -- [fcl-wc] linter
nialexsan Nov 15, 2023
30175eb
PKG -- [fcl-wc] revert changes on fcl-wc
nialexsan Nov 15, 2023
3dfed8a
VSN -- [root] updated lock
nialexsan Nov 16, 2023
2e795ed
VSN -- [root] update package-lock.json
nialexsan Nov 16, 2023
7ae9bc2
PKG -- [fcl-wc] revert jest config
nialexsan Nov 16, 2023
15431e4
PKG -- [fcl] revert fcl-web to fcl
nialexsan Nov 16, 2023
fa1bcaa
PKG -- [fcl] Revert rename fcl
nialexsan Nov 16, 2023
0685f12
PKG -- [fcl] Revert unrelated fcl-core changes
nialexsan Nov 16, 2023
7a67eff
PKG -- [fcl] revert unrelated fcl-core
nialexsan Nov 16, 2023
0ad9e59
PKG -- [fcl-core] revert unrelated fcl-core
nialexsan Nov 16, 2023
20438b6
PKG -- [fcl-wc] revert fcl-core changes
nialexsan Nov 16, 2023
e689184
PKG -- [fcl-wc] revert fcl-core
nialexsan Nov 16, 2023
0bd06c1
PKG -- [fcl-wc] revert fcl-core
nialexsan Nov 16, 2023
02d7c9b
PKG -- [fcl-wc] fix test
nialexsan Nov 16, 2023
5480fb7
VSN -- [root] Update lock
nialexsan Nov 16, 2023
4ee850a
Merge remote-tracking branch 'origin/master' into nialexsan/fcl-core-…
nialexsan Nov 28, 2023
e44dd47
PKG -- [root] update lock
nialexsan Nov 28, 2023
e6858d6
Merge remote-tracking branch 'origin/master' into nialexsan/fcl-core-…
nialexsan Nov 29, 2023
b61dd1e
PKG -- [fcl] fix build config
nialexsan Nov 29, 2023
b953833
PKG -- [fcl] fix types path
nialexsan Nov 29, 2023
9e0d457
PKG -- [fcl] pin fcl-core
nialexsan Dec 1, 2023
c2c6a92
PKG -- [fcl] manually defined imports
nialexsan Dec 1, 2023
3af8a43
VSN -- [fcl] changeset
nialexsan Dec 4, 2023
bf3ecef
VSN -- [root] alpha release
nialexsan Dec 4, 2023
7ba6eaf
VSN -- [root] updated lock
nialexsan Dec 4, 2023
9f60ced
PKG -- [fcl] fix missing packages
nialexsan Dec 5, 2023
f269dcc
VSN -- [root] fix missing packages
nialexsan Dec 5, 2023
22e98d5
VSN -- [root] updated packages
nialexsan Dec 5, 2023
f2e1cff
VSN -- [root] exit alpha
nialexsan Dec 6, 2023
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
27,975 changes: 17,820 additions & 10,155 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"start": "npm run build && lerna run start --parallel",
"test": "jest",
"release": "npm run build && npm run changeset publish",
"changeset": "changeset"
"changeset": "changeset",
"clear": "find . -name node_modules -type d -prune -exec rm -rf '{}' + && find . -name dist -type d -prune -exec rm -rf '{}' +"
},
"name": "fcl-js",
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"eslint": "^8.48.0",
"eslint-plugin-jsdoc": "^46.5.1",
"eslint-plugin-jsdoc": "^46.9.0",
"jest": "^29.5.0",
"typescript": "^4.9.5"
},
Expand All @@ -43,6 +43,6 @@
"@onflow/util-invariant": "^1.2.1",
"@onflow/util-logger": "^1.3.1",
"eslint": "^8.34.0",
"eslint-plugin-jsdoc": "^40.0.0"
"eslint-plugin-jsdoc": "^46.9.0"
}
}
7 changes: 7 additions & 0 deletions packages/fcl-core/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"presets": [
[
"@babel/preset-env"
]
]
}
2 changes: 2 additions & 0 deletions packages/fcl-core/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
defaults and supports es6-module
maintained node versions
31 changes: 31 additions & 0 deletions packages/fcl-core/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"env": {
"browser": true,
"es2021": true,
"jest": true,
"node": true
},
"extends": [
"plugin:jsdoc/recommended"
],
"plugins": [
"jsdoc"
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"globals": {
"JSX": "readonly"
},
"ignorePatterns": ["**/dist/"],

"rules": {
"jsdoc/require-jsdoc": 0,
"jsdoc/tag-lines": 0,
"jsdoc/require-param-description": 0,
"jsdoc/valid-types": 0,
"jsdoc/require-returns-description": 0,
"no-undef": 1
}
}
1 change: 1 addition & 0 deletions packages/fcl-core/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
types/
2 changes: 2 additions & 0 deletions packages/fcl-core/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src/
assets/
File renamed without changes.
40 changes: 40 additions & 0 deletions packages/fcl-core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# FCL: Flow Client Library
### Making secure web applications powered by the Flow Blockchain

Flow Client Library (FCL) enables applications to easily integrate with all FCL-compatible wallets and
other services (e.g. (Coming Soon) profiles, private information, notifications). This offers developers a strong
foundation to compose their apps with existing building blocks. It’s currently supported for browser
applications, and will be extended to other platforms.

With FCL, you can:

- Integrate all compatible wallets without any custom code or code injection
- Authenticate users
- Query the Flow Blockchain
- Send transactions (e.g. initializing resources, sending assets, purchasing, etc.)
- Sign transactions through wallet integration avoiding key management

With FCL, you will eventually be able to:

- Personally sign data via FCL Compatible Wallets
- Request Additional User info like Emails

## Status

- **Last Updated:** Mar 2nd 2021
- **Stable:** Yes
- **Risk of Breaking Change:** Low

The things that exists probably won't be changing much externally, we will be adding new functionality in the near future.

## Install

```bash
npm install --save @onflow/fcl @onflow/types
```

## Getting Started

For a detailed guide explaining how to use `@onflow/fcl` to interact with Flow please see the [Flow App Quick Start](https://developers.flow.com/tutorials/flow-app-quickstart)

Having trouble with something? Reach out to us on [Discord](https://discord.gg/k6cZ7QC), we are more than happy to help.
17 changes: 17 additions & 0 deletions packages/fcl-core/TRANSITIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Transitions

## 0001 Deprecate `env` config key
- **Date:** May 26th 2022
- **Type:** Deprecation of `env` in config

When specifying which flow network for FCL to use, use the `flow.network` config key instead of `env` (e.g. `fcl.config.put("flow.network", "testnet")`). Permitted values are currently `local`, `canarynet`, `testnet`, `mainnet`.

FCL currently falls back to `env` for the `flow.network` field but this will be removed in a future update.

## 0002 Deprecate `flow.network` config key
- **Date:** September 26th 2022
- **Type:** Deprecation of `flow.network` in config

FCL now has a built-in utility to get which flow network to use. Manual specification in config is no longer required

FCL currently falls back to `flow.network` in case of failure but this will be removed in a future update.
File renamed without changes.
65 changes: 65 additions & 0 deletions packages/fcl-core/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"name": "@onflow/fcl-core",
"version": "1.8.1",
"description": "Flow Client Library",
"license": "Apache-2.0",
"author": "Dapper Labs <dev@dapperlabs.com>",
"homepage": "https://onflow.org",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/onflow/flow-js-sdk.git"
},
"bugs": {
"url": "https://github.com/onflow/flow-js-sdk/issues"
},
"jest": {
"testEnvironment": "jsdom",
"globals": {
"PACKAGE_CURRENT_VERSION": "TESTVERSION"
}
},
"devDependencies": {
"@onflow/fcl-bundle": "^1.4.1",
"@onflow/typedefs": "^1.2.1",
"@types/estree": "^1.0.1",
"@types/jest": "^29.5.4",
"@types/node": "^18.13.0",
"eslint": "^8.35.0",
"eslint-plugin-jsdoc": "^46.9.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"typescript": "^4.9.5"
},
"source": "src/fcl-core.ts",
"main": "dist/fcl-core.js",
"module": "dist/fcl-core.module.js",
"unpkg": "dist/fcl-core.umd.min.js",
"types": "types/fcl-core.d.ts",
"scripts": {
"pain": "npm publish --tag pain",
"alpha": "npm publish --tag alpha",
"prepublishOnly": "npm test && npm run build",
"test": "jest",
"test:watch": "jest --watch",
"build": "npm run lint && fcl-bundle",
"build:types": "tsc --project ./tsconfig-web.json && tsc --noResolve --project ./tsconfig-react-native.json",
"start": "fcl-bundle --watch",
"lint": "eslint ."
},
"dependencies": {
"@babel/runtime": "^7.18.6",
"@onflow/config": "^1.2.1",
"@onflow/interaction": "0.0.11",
"@onflow/rlp": "^1.2.1",
"@onflow/sdk": "^1.3.1",
"@onflow/types": "^1.2.1",
"@onflow/util-actor": "^1.3.1",
"@onflow/util-address": "^1.2.1",
"@onflow/util-invariant": "^1.2.1",
"@onflow/util-logger": "^1.3.1",
"@onflow/util-semver": "^1.0.1",
"@onflow/util-template": "^1.2.1",
"@onflow/util-uid": "^1.2.1",
"cross-fetch": "^3.1.6"
}
}
1 change: 1 addition & 0 deletions packages/fcl-core/src/VERSION.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const VERSION = PACKAGE_CURRENT_VERSION || "TESTVERSION"
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,20 @@ import {watchForChainIdChanges} from "./utils"

// Set chain id default on access node change
watchForChainIdChanges()


export {getMutate} from "./exec/mutate"

export {getCurrentUser} from "./current-user"

export {initServiceRegistry} from "./current-user/exec-service/plugins"

export { isReactNative, setIsReactNative } from './utils/is-react-native'

export {getExecHttpPost} from "./current-user/exec-service/strategies/http-post"

export {normalizePollingResponse} from "./normalizers/service/polling-response"
export {buildMessageHandler} from "./current-user/exec-service/strategies/utils/buildMessageHandler"
export {serviceEndpoint} from "./current-user/exec-service/strategies/utils/service-endpoint"
export {URL} from './utils/url'
export {CORE_STRATEGIES, FCL_REDIRECT_URL_PARAM_NAME, FCL_RESPONSE_PARAM_NAME } from './utils/constants'
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions packages/fcl-core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../../tsconfig",
// Change this to match your project
"include": ["src/**/*"],
"compilerOptions": {
"declarationDir": "types",
"rootDir": "src",
}
}
7 changes: 7 additions & 0 deletions packages/fcl-react-native/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"presets": [
[
"@babel/preset-env"
]
]
}
2 changes: 2 additions & 0 deletions packages/fcl-react-native/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
defaults and supports es6-module
maintained node versions
31 changes: 31 additions & 0 deletions packages/fcl-react-native/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"env": {
"browser": true,
"es2021": true,
"jest": true,
"node": true
},
"extends": [
"plugin:jsdoc/recommended"
],
"plugins": [
"jsdoc"
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"globals": {
"JSX": "readonly"
},
"ignorePatterns": ["**/dist/"],

"rules": {
"jsdoc/require-jsdoc": 0,
"jsdoc/tag-lines": 0,
"jsdoc/require-param-description": 0,
"jsdoc/valid-types": 0,
"jsdoc/require-returns-description": 0,
"no-undef": 1
}
}
1 change: 1 addition & 0 deletions packages/fcl-react-native/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
types/
1 change: 1 addition & 0 deletions packages/fcl-react-native/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/
40 changes: 40 additions & 0 deletions packages/fcl-react-native/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# FCL: Flow Client Library
### Making secure web applications powered by the Flow Blockchain

Flow Client Library (FCL) enables applications to easily integrate with all FCL-compatible wallets and
other services (e.g. (Coming Soon) profiles, private information, notifications). This offers developers a strong
foundation to compose their apps with existing building blocks. It’s currently supported for browser
applications, and will be extended to other platforms.

With FCL, you can:

- Integrate all compatible wallets without any custom code or code injection
- Authenticate users
- Query the Flow Blockchain
- Send transactions (e.g. initializing resources, sending assets, purchasing, etc.)
- Sign transactions through wallet integration avoiding key management

With FCL, you will eventually be able to:

- Personally sign data via FCL Compatible Wallets
- Request Additional User info like Emails

## Status

- **Last Updated:** Mar 2nd 2021
- **Stable:** Yes
- **Risk of Breaking Change:** Low

The things that exists probably won't be changing much externally, we will be adding new functionality in the near future.

## Install

```bash
npm install --save @onflow/fcl @onflow/types
```

## Getting Started

For a detailed guide explaining how to use `@onflow/fcl` to interact with Flow please see the [Flow App Quick Start](https://developers.flow.com/tutorials/flow-app-quickstart)

Having trouble with something? Reach out to us on [Discord](https://discord.gg/k6cZ7QC), we are more than happy to help.
Loading
Loading