From 9bdb27d36ac0cc0de4e634c98e56acfb0ecc9ca6 Mon Sep 17 00:00:00 2001 From: Niko Date: Sat, 3 Jun 2023 23:27:38 +0300 Subject: [PATCH] raname sdk to ng-sdk-js --- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 2 +- ng-app-js/app-web/test.js | 8 ---- ng-app/README.md | 5 ++- ng-app/package.json | 2 +- ng-app/src/App.svelte | 2 +- ng-app/src/lib/Greet.svelte | 2 +- {ng-app-js => ng-sdk-js}/Cargo.toml | 2 +- {ng-app-js => ng-sdk-js}/LICENSE-APACHE2 | 0 {ng-app-js => ng-sdk-js}/LICENSE-MIT | 0 {ng-app-js => ng-sdk-js}/README.md | 42 ++++++++++--------- {ng-app-js => ng-sdk-js}/app-node/.gitignore | 0 {ng-app-js => ng-sdk-js}/app-node/index.js | 3 +- .../app-node/package-lock.json | 0 .../app-node/package.json | 2 +- {ng-app-js => ng-sdk-js}/app-node/test.js | 2 +- {ng-app-js => ng-sdk-js}/app-react/.babelrc | 0 {ng-app-js => ng-sdk-js}/app-react/.gitignore | 0 {ng-app-js => ng-sdk-js}/app-react/README.md | 0 .../app-react/package-lock.json | 0 .../app-react/package.json | 2 +- .../app-react/public/index.html | 0 .../app-react/src/index.jsx | 2 +- .../app-react/src/test.js | 2 +- .../app-react/webpack.config.js | 0 {ng-app-js => ng-sdk-js}/app-web/.gitignore | 0 .../app-web/LICENSE-APACHE | 0 {ng-app-js => ng-sdk-js}/app-web/LICENSE-MIT | 0 {ng-app-js => ng-sdk-js}/app-web/README.md | 0 {ng-app-js => ng-sdk-js}/app-web/bootstrap.js | 0 {ng-app-js => ng-sdk-js}/app-web/index.html | 0 {ng-app-js => ng-sdk-js}/app-web/index.js | 2 +- .../app-web/package-lock.json | 0 {ng-app-js => ng-sdk-js}/app-web/package.json | 2 +- ng-sdk-js/app-web/test.js | 8 ++++ .../app-web/webpack.config.js | 0 {ng-app-js => ng-sdk-js}/index.html | 8 ++-- {ng-app-js => ng-sdk-js}/js/browser.js | 0 {ng-app-js => ng-sdk-js}/js/node.js | 0 {ng-app-js => ng-sdk-js}/prepare-node.js | 2 +- {ng-app-js => ng-sdk-js}/src/lib.rs | 0 package.json | 13 ++++++ pnpm-lock.yaml | 4 +- pnpm-workspace.yaml | 3 +- 45 files changed, 72 insertions(+), 52 deletions(-) delete mode 100644 ng-app-js/app-web/test.js rename {ng-app-js => ng-sdk-js}/Cargo.toml (95%) rename {ng-app-js => ng-sdk-js}/LICENSE-APACHE2 (100%) rename {ng-app-js => ng-sdk-js}/LICENSE-MIT (100%) rename {ng-app-js => ng-sdk-js}/README.md (80%) rename {ng-app-js => ng-sdk-js}/app-node/.gitignore (100%) rename {ng-app-js => ng-sdk-js}/app-node/index.js (89%) rename {ng-app-js => ng-sdk-js}/app-node/package-lock.json (100%) rename {ng-app-js => ng-sdk-js}/app-node/package.json (92%) rename {ng-app-js => ng-sdk-js}/app-node/test.js (65%) rename {ng-app-js => ng-sdk-js}/app-react/.babelrc (100%) rename {ng-app-js => ng-sdk-js}/app-react/.gitignore (100%) rename {ng-app-js => ng-sdk-js}/app-react/README.md (100%) rename {ng-app-js => ng-sdk-js}/app-react/package-lock.json (100%) rename {ng-app-js => ng-sdk-js}/app-react/package.json (96%) rename {ng-app-js => ng-sdk-js}/app-react/public/index.html (100%) rename {ng-app-js => ng-sdk-js}/app-react/src/index.jsx (96%) rename {ng-app-js => ng-sdk-js}/app-react/src/test.js (80%) rename {ng-app-js => ng-sdk-js}/app-react/webpack.config.js (100%) rename {ng-app-js => ng-sdk-js}/app-web/.gitignore (100%) rename {ng-app-js => ng-sdk-js}/app-web/LICENSE-APACHE (100%) rename {ng-app-js => ng-sdk-js}/app-web/LICENSE-MIT (100%) rename {ng-app-js => ng-sdk-js}/app-web/README.md (100%) rename {ng-app-js => ng-sdk-js}/app-web/bootstrap.js (100%) rename {ng-app-js => ng-sdk-js}/app-web/index.html (100%) rename {ng-app-js => ng-sdk-js}/app-web/index.js (93%) rename {ng-app-js => ng-sdk-js}/app-web/package-lock.json (100%) rename {ng-app-js => ng-sdk-js}/app-web/package.json (96%) create mode 100644 ng-sdk-js/app-web/test.js rename {ng-app-js => ng-sdk-js}/app-web/webpack.config.js (100%) rename {ng-app-js => ng-sdk-js}/index.html (88%) rename {ng-app-js => ng-sdk-js}/js/browser.js (100%) rename {ng-app-js => ng-sdk-js}/js/node.js (100%) rename {ng-app-js => ng-sdk-js}/prepare-node.js (67%) rename {ng-app-js => ng-sdk-js}/src/lib.rs (100%) create mode 100644 package.json diff --git a/Cargo.lock b/Cargo.lock index 638d8c7..245a613 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2487,7 +2487,7 @@ dependencies = [ ] [[package]] -name = "ng-app-js-sdk" +name = "ng-sdk-js" version = "0.1.0" dependencies = [ "async-std", diff --git a/Cargo.toml b/Cargo.toml index c4fee2f..e3b7c21 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ members = [ "ngcli", "ngd", "ngone", - "ng-app-js", + "ng-sdk-js", "ng-app/src-tauri", "ng-wallet" ] diff --git a/README.md b/README.md index 4f4a9e9..c90e419 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ The crates are organized as follow : - ngcli : CLI tool to manipulate the repos - ngd : binary executable of the daemon (that can run a broker, verifier and/or Rust services) - ngone : server for nextgraph.one (boostrap into the right app) -- ng-app-js : contains the JS SDK, the web app, react app, and some node services +- ng-sdk-js : contains the JS SDK, with example apps: web app, react app, or node service. - ng-app : all the native apps, based on Tauri, and the web app. - ng-wallet : keeps the secret keys of all identities of the user in a safe wallet diff --git a/ng-app-js/app-web/test.js b/ng-app-js/app-web/test.js deleted file mode 100644 index b2741b5..0000000 --- a/ng-app-js/app-web/test.js +++ /dev/null @@ -1,8 +0,0 @@ - -import * as ng from "ng-app-js-sdk"; - -function test() { - ng.test() -} - -export default test; \ No newline at end of file diff --git a/ng-app/README.md b/ng-app/README.md index 4764fa5..910e521 100644 --- a/ng-app/README.md +++ b/ng-app/README.md @@ -30,10 +30,11 @@ pnpm webdev ``` pnpm webbuild // then the application is available in dist-web folder -// can be served with cd dist-web ; python3 -m http.server +// can be served with: +cd dist-web ; python3 -m http.server ``` -in order a build a self-contained html file, useful for offline use, do: +in order to build a self-contained html file, useful for offline use, do: ``` pnpm filebuild diff --git a/ng-app/package.json b/ng-app/package.json index 6df9974..a1a25b5 100644 --- a/ng-app/package.json +++ b/ng-app/package.json @@ -19,7 +19,7 @@ "classnames": "^2.3.2", "flowbite": "^1.6.5", "flowbite-svelte": "^0.37.1", - "ng-app-js-sdk": "workspace:^0.1.0", + "ng-sdk-js": "workspace:^0.1.0", "svelte-spa-router": "^3.3.0", "vite-plugin-top-level-await": "^1.3.1" }, diff --git a/ng-app/src/App.svelte b/ng-app/src/App.svelte index 765c84b..79c3155 100644 --- a/ng-app/src/App.svelte +++ b/ng-app/src/App.svelte @@ -10,7 +10,7 @@ --> diff --git a/ng-app-js/js/browser.js b/ng-sdk-js/js/browser.js similarity index 100% rename from ng-app-js/js/browser.js rename to ng-sdk-js/js/browser.js diff --git a/ng-app-js/js/node.js b/ng-sdk-js/js/node.js similarity index 100% rename from ng-app-js/js/node.js rename to ng-sdk-js/js/node.js diff --git a/ng-app-js/prepare-node.js b/ng-sdk-js/prepare-node.js similarity index 67% rename from ng-app-js/prepare-node.js rename to ng-sdk-js/prepare-node.js index d88a6d7..51bb701 100644 --- a/ng-app-js/prepare-node.js +++ b/ng-sdk-js/prepare-node.js @@ -4,6 +4,6 @@ const PATH = './pkg-node/package.json'; const pkg_json = fs.readFileSync(PATH); let pkg = JSON.parse(pkg_json) -pkg.name = "ng-app-node-sdk"; +pkg.name = "ng-sdk-node"; pkg.description = "nodejs app sdk of NextGraph"; fs.writeFileSync(PATH, JSON.stringify(pkg, null, 2), 'utf8'); \ No newline at end of file diff --git a/ng-app-js/src/lib.rs b/ng-sdk-js/src/lib.rs similarity index 100% rename from ng-app-js/src/lib.rs rename to ng-sdk-js/src/lib.rs diff --git a/package.json b/package.json new file mode 100644 index 0000000..5444baf --- /dev/null +++ b/package.json @@ -0,0 +1,13 @@ +{ + "name": "nextgraph-rs", + "private": true, + "version": "0.1.0", + "pnpm": { + "peerDependencyRules": { + "ignoreMissing": [ + "rollup" + ] + } + } + } + \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bdf6eba..770b32b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,7 +16,7 @@ importers: flowbite: ^1.6.5 flowbite-svelte: ^0.37.1 internal-ip: ^7.0.0 - ng-app-js-sdk: workspace:^0.1.0 + ng-sdk-js: workspace:^0.1.0 postcss: ^8.4.23 postcss-load-config: ^4.0.1 svelte: ^3.54.0 @@ -37,7 +37,7 @@ importers: classnames: 2.3.2 flowbite: 1.6.5 flowbite-svelte: 0.37.3_svelte@3.59.1 - ng-app-js-sdk: link:../ng-app-js/pkg + ng-sdk-js: link:../ng-sdk-js/pkg svelte-spa-router: 3.3.0 vite-plugin-top-level-await: 1.3.1_vite@4.3.9 devDependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 1ef543a..727dd42 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,2 +1,3 @@ packages: - - ng-app-js/pkg \ No newline at end of file + - ng-sdk-js/pkg + - ng-app \ No newline at end of file