Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3384913
D6169.id20641.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D6169.id20641.diff
View Options
diff --git a/keyserver/Dockerfile b/keyserver/Dockerfile
--- a/keyserver/Dockerfile
+++ b/keyserver/Dockerfile
@@ -108,15 +108,15 @@
COPY --chown=comm native/package.json native/.flowconfig native/postinstall.sh native/
COPY --chown=comm landing/package.json landing/.flowconfig landing/
COPY --chown=comm desktop/package.json desktop/
-COPY --chown=comm keyserver/addons/opaque-ke-napi/package.json \
- keyserver/addons/opaque-ke-napi/
+COPY --chown=comm keyserver/addons/rust-node-addon/package.json \
+ keyserver/addons/rust-node-addon/
COPY --chown=comm native/expo-modules/android-lifecycle/package.json \
native/expo-modules/android-lifecycle/
# Create empty Rust library and copy in Cargo.toml file
-RUN cargo init keyserver/addons/opaque-ke-napi --lib
-COPY --chown=comm keyserver/addons/opaque-ke-napi/Cargo.toml \
- keyserver/addons/opaque-ke-napi/
+RUN cargo init keyserver/addons/rust-node-addon --lib
+COPY --chown=comm keyserver/addons/rust-node-addon/Cargo.toml \
+ keyserver/addons/rust-node-addon/
# Copy in files needed for patch-package
COPY --chown=comm patches patches/
@@ -145,10 +145,10 @@
#-------------------------------------------------------------------------------
# STEP 9: BUILD NODE ADDON
-# Now that source files have been copied in, build the opaque-ke-napi addon
+# Now that source files have been copied in, build rust-node-addon
#-------------------------------------------------------------------------------
-RUN yarn workspace opaque-ke-napi build
+RUN yarn workspace rust-node-addon build
#-------------------------------------------------------------------------------
# STEP 10: RUN BUILD SCRIPTS
diff --git a/keyserver/addons/opaque-ke-napi/.gitignore b/keyserver/addons/rust-node-addon/.gitignore
rename from keyserver/addons/opaque-ke-napi/.gitignore
rename to keyserver/addons/rust-node-addon/.gitignore
diff --git a/keyserver/addons/opaque-ke-napi/Cargo.toml b/keyserver/addons/rust-node-addon/Cargo.toml
rename from keyserver/addons/opaque-ke-napi/Cargo.toml
rename to keyserver/addons/rust-node-addon/Cargo.toml
--- a/keyserver/addons/opaque-ke-napi/Cargo.toml
+++ b/keyserver/addons/rust-node-addon/Cargo.toml
@@ -1,6 +1,6 @@
[package]
edition = "2021"
-name = "opaque-ke-napi"
+name = "rust-node-addon"
version = "0.1.0"
license = "BSD-3-Clause"
diff --git a/keyserver/addons/opaque-ke-napi/build.rs b/keyserver/addons/rust-node-addon/build.rs
rename from keyserver/addons/opaque-ke-napi/build.rs
rename to keyserver/addons/rust-node-addon/build.rs
diff --git a/keyserver/addons/opaque-ke-napi/index.js b/keyserver/addons/rust-node-addon/index.js
rename from keyserver/addons/opaque-ke-napi/index.js
rename to keyserver/addons/rust-node-addon/index.js
--- a/keyserver/addons/opaque-ke-napi/index.js
+++ b/keyserver/addons/rust-node-addon/index.js
@@ -10,16 +10,16 @@
let nativeBinding = null;
if (platform === 'darwin' && arch === 'x64') {
// $FlowFixMe
- nativeBinding = await import('./napi/opaque-ke-napi.darwin-x64.node');
+ nativeBinding = await import('./napi/rust-node-addon.darwin-x64.node');
} else if (platform === 'darwin' && arch === 'arm64') {
// $FlowFixMe
- nativeBinding = await import('./napi/opaque-ke-napi.darwin-arm64.node');
+ nativeBinding = await import('./napi/rust-node-addon.darwin-arm64.node');
} else if (platform === 'linux' && arch === 'x64') {
// $FlowFixMe
- nativeBinding = await import('./napi/opaque-ke-napi.linux-x64-gnu.node');
+ nativeBinding = await import('./napi/rust-node-addon.linux-x64-gnu.node');
} else if (platform === 'linux' && arch === 'arm64') {
// $FlowFixMe
- nativeBinding = await import('./napi/opaque-ke-napi.linux-arm64-gnu.node');
+ nativeBinding = await import('./napi/rust-node-addon.linux-arm64-gnu.node');
} else {
throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`);
}
diff --git a/keyserver/addons/opaque-ke-napi/package.json b/keyserver/addons/rust-node-addon/package.json
rename from keyserver/addons/opaque-ke-napi/package.json
rename to keyserver/addons/rust-node-addon/package.json
--- a/keyserver/addons/opaque-ke-napi/package.json
+++ b/keyserver/addons/rust-node-addon/package.json
@@ -5,12 +5,12 @@
]
},
"private": true,
- "name": "opaque-ke-napi",
+ "name": "rust-node-addon",
"version": "0.0.1",
"main": "index.js",
"type": "module",
"napi": {
- "name": "opaque-ke-napi",
+ "name": "rust-node-addon",
"triples": {
"defaults": false,
"additional": [
diff --git a/keyserver/addons/opaque-ke-napi/src/lib.rs b/keyserver/addons/rust-node-addon/src/lib.rs
rename from keyserver/addons/opaque-ke-napi/src/lib.rs
rename to keyserver/addons/rust-node-addon/src/lib.rs
diff --git a/keyserver/loader.mjs b/keyserver/loader.mjs
--- a/keyserver/loader.mjs
+++ b/keyserver/loader.mjs
@@ -4,7 +4,7 @@
landing: 'landing',
lib: 'lib',
web: 'web',
- ['opaque-ke-napi']: 'keyserver/addons/opaque-ke-napi',
+ ['rust-node-addon']: 'keyserver/addons/rust-node-addon',
};
async function resolve(specifier, context, nextResolve) {
diff --git a/keyserver/package.json b/keyserver/package.json
--- a/keyserver/package.json
+++ b/keyserver/package.json
@@ -60,7 +60,7 @@
"mysql2": "^2.3.3",
"node-schedule": "^2.1.0",
"nodemailer": "^6.6.1",
- "opaque-ke-napi": "0.0.1",
+ "rust-node-addon": "0.0.1",
"react": "18.1.0",
"react-dom": "18.1.0",
"react-html-email": "^3.0.0",
diff --git a/keyserver/src/opaque-ke-napi b/keyserver/src/opaque-ke-napi
deleted file mode 120000
--- a/keyserver/src/opaque-ke-napi
+++ /dev/null
@@ -1 +0,0 @@
-../addons/opaque-ke-napi
\ No newline at end of file
diff --git a/keyserver/src/rust-node-addon b/keyserver/src/rust-node-addon
new file mode 120000
--- /dev/null
+++ b/keyserver/src/rust-node-addon
@@ -0,0 +1 @@
+../addons/rust-node-addon
\ No newline at end of file
diff --git a/package.json b/package.json
--- a/package.json
+++ b/package.json
@@ -8,11 +8,11 @@
"keyserver",
"landing",
"desktop",
- "keyserver/addons/opaque-ke-napi",
+ "keyserver/addons/rust-node-addon",
"native/expo-modules/android-lifecycle"
],
"scripts": {
- "clean": "yarn workspace lib clean && yarn workspace web clean && yarn workspace native clean && yarn workspace keyserver clean && yarn workspace landing clean && yarn workspace desktop clean && yarn workspace opaque-ke-napi clean && rm -rf node_modules/",
+ "clean": "yarn workspace lib clean && yarn workspace web clean && yarn workspace native clean && yarn workspace keyserver clean && yarn workspace landing clean && yarn workspace desktop clean && yarn workspace rust-node-addon clean && rm -rf node_modules/",
"cleaninstall": "(killall flow || pkill flow || true) && yarn clean && yarn",
"eslint": "eslint .",
"eslint:fix": "eslint --fix .",
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 10:37 PM (2 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2595700
Default Alt Text
D6169.id20641.diff (6 KB)
Attached To
Mode
D6169: [keyserver] rename node addon
Attached
Detach File
Event Timeline
Log In to Comment