Skip to content

Commit

Permalink
chore: release v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Feb 9, 2025
1 parent 47df782 commit 5b2e7ae
Show file tree
Hide file tree
Showing 16 changed files with 199 additions and 117 deletions.
214 changes: 122 additions & 92 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ strip = true
opt-level = 's'

[workspace.package]
version = "0.9.12"
version = "1.0.0"
edition = "2021"
repository = "https://github.com/ldclabs/ic-oss"
keywords = ["file", "storage", "oss", "s3", "icp"]
Expand Down
4 changes: 2 additions & 2 deletions examples/ai_canister/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ serde = { workspace = true }
serde_bytes = { workspace = true }
getrandom = { workspace = true }
rand = { version = "0.8", features = ["getrandom"] }
ic-oss-types = { path = "../../src/ic_oss_types", version = "0.9" }
ic-oss-can = { path = "../../src/ic_oss_can", version = "0.9" }
ic-oss-types = { path = "../../src/ic_oss_types", version = "1" }
ic-oss-can = { path = "../../src/ic_oss_can", version = "1" }
8 changes: 8 additions & 0 deletions src/declarations/ic_oss_cluster/ic_oss_cluster.did
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ service : (opt ChainArgs) -> {
admin_attach_policies : (Token) -> (Result_1);
admin_batch_call_buckets : (vec principal, text, opt blob) -> (Result_2);
admin_create_bucket : (opt CanisterSettings, opt blob) -> (Result_3);
admin_create_bucket_on : (principal, opt CanisterSettings, opt blob) -> (
Result_3,
);
admin_deploy_bucket : (DeployWasmInput, opt blob) -> (Result_1);
admin_detach_policies : (Token) -> (Result_1);
admin_ed25519_access_token : (Token) -> (Result);
Expand Down Expand Up @@ -156,6 +159,11 @@ service : (opt ChainArgs) -> {
validate_admin_create_bucket : (opt CanisterSettings, opt blob) -> (
Result_11,
);
validate_admin_create_bucket_on : (
principal,
opt CanisterSettings,
opt blob,
) -> (Result_11);
validate_admin_deploy_bucket : (DeployWasmInput, opt blob) -> (Result_1);
validate_admin_remove_committers : (vec principal) -> (Result_11);
validate_admin_remove_managers : (vec principal) -> (Result_11);
Expand Down
8 changes: 8 additions & 0 deletions src/declarations/ic_oss_cluster/ic_oss_cluster.did.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ export interface _SERVICE {
[[] | [CanisterSettings], [] | [Uint8Array | number[]]],
Result_3
>,
'admin_create_bucket_on' : ActorMethod<
[Principal, [] | [CanisterSettings], [] | [Uint8Array | number[]]],
Result_3
>,
'admin_deploy_bucket' : ActorMethod<
[DeployWasmInput, [] | [Uint8Array | number[]]],
Result_1
Expand Down Expand Up @@ -213,6 +217,10 @@ export interface _SERVICE {
[[] | [CanisterSettings], [] | [Uint8Array | number[]]],
Result_11
>,
'validate_admin_create_bucket_on' : ActorMethod<
[Principal, [] | [CanisterSettings], [] | [Uint8Array | number[]]],
Result_11
>,
'validate_admin_deploy_bucket' : ActorMethod<
[DeployWasmInput, [] | [Uint8Array | number[]]],
Result_1
Expand Down
10 changes: 10 additions & 0 deletions src/declarations/ic_oss_cluster/ic_oss_cluster.did.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ export const idlFactory = ({ IDL }) => {
[Result_3],
[],
),
'admin_create_bucket_on' : IDL.Func(
[IDL.Principal, IDL.Opt(CanisterSettings), IDL.Opt(IDL.Vec(IDL.Nat8))],
[Result_3],
[],
),
'admin_deploy_bucket' : IDL.Func(
[DeployWasmInput, IDL.Opt(IDL.Vec(IDL.Nat8))],
[Result_1],
Expand Down Expand Up @@ -258,6 +263,11 @@ export const idlFactory = ({ IDL }) => {
[Result_11],
[],
),
'validate_admin_create_bucket_on' : IDL.Func(
[IDL.Principal, IDL.Opt(CanisterSettings), IDL.Opt(IDL.Vec(IDL.Nat8))],
[Result_11],
[],
),
'validate_admin_deploy_bucket' : IDL.Func(
[DeployWasmInput, IDL.Opt(IDL.Vec(IDL.Nat8))],
[Result_1],
Expand Down
2 changes: 1 addition & 1 deletion src/ic_oss/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ tokio-stream = { workspace = true }
futures = { workspace = true }
sha3 = { workspace = true }
ic-agent = { workspace = true }
ic-oss-types = { path = "../ic_oss_types", version = "0.9" }
ic-oss-types = { path = "../ic_oss_types", version = "1" }
2 changes: 1 addition & 1 deletion src/ic_oss_bucket/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ ic-http-certification = { workspace = true }
getrandom = { workspace = true }
lazy_static = "1.4"
hyperx = { git = "https://github.com/ldclabs/hyperx", rev = "4b9bd373b8c4d29a32e59912bf598ba69273c032" }
ic-oss-types = { path = "../ic_oss_types", version = "0.9" }
ic-oss-types = { path = "../ic_oss_types", version = "1" }
2 changes: 1 addition & 1 deletion src/ic_oss_can/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ serde_bytes = { workspace = true }
ciborium = { workspace = true }
ic-cdk = { workspace = true }
ic-stable-structures = { workspace = true }
ic-oss-types = { path = "../ic_oss_types", version = "0.9" }
ic-oss-types = { path = "../ic_oss_types", version = "1" }
4 changes: 2 additions & 2 deletions src/ic_oss_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ tokio = { workspace = true }
sha3 = { workspace = true }
hex = { workspace = true }
ic-agent = { workspace = true }
ic-oss = { path = "../ic_oss", version = "0.9" }
ic-oss-types = { path = "../ic_oss_types", version = "0.9" }
ic-oss = { path = "../ic_oss", version = "1" }
ic-oss-types = { path = "../ic_oss_types", version = "1" }
anyhow = "1"
clap = { version = "=4.5", features = ["derive"] }
infer = "0.15"
Expand Down
2 changes: 1 addition & 1 deletion src/ic_oss_cluster/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ serde = { workspace = true }
serde_bytes = { workspace = true }
getrandom = { workspace = true }
ed25519-dalek = { workspace = true }
ic-oss-types = { path = "../ic_oss_types", version = "0.9" }
ic-oss-types = { path = "../ic_oss_types", version = "1" }
8 changes: 8 additions & 0 deletions src/ic_oss_ts/candid/ic_oss_cluster/ic_oss_cluster.did
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ service : (opt ChainArgs) -> {
admin_attach_policies : (Token) -> (Result_1);
admin_batch_call_buckets : (vec principal, text, opt blob) -> (Result_2);
admin_create_bucket : (opt CanisterSettings, opt blob) -> (Result_3);
admin_create_bucket_on : (principal, opt CanisterSettings, opt blob) -> (
Result_3,
);
admin_deploy_bucket : (DeployWasmInput, opt blob) -> (Result_1);
admin_detach_policies : (Token) -> (Result_1);
admin_ed25519_access_token : (Token) -> (Result);
Expand Down Expand Up @@ -156,6 +159,11 @@ service : (opt ChainArgs) -> {
validate_admin_create_bucket : (opt CanisterSettings, opt blob) -> (
Result_11,
);
validate_admin_create_bucket_on : (
principal,
opt CanisterSettings,
opt blob,
) -> (Result_11);
validate_admin_deploy_bucket : (DeployWasmInput, opt blob) -> (Result_1);
validate_admin_remove_committers : (vec principal) -> (Result_11);
validate_admin_remove_managers : (vec principal) -> (Result_11);
Expand Down
8 changes: 8 additions & 0 deletions src/ic_oss_ts/candid/ic_oss_cluster/ic_oss_cluster.did.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ export interface _SERVICE {
[[] | [CanisterSettings], [] | [Uint8Array | number[]]],
Result_3
>,
'admin_create_bucket_on' : ActorMethod<
[Principal, [] | [CanisterSettings], [] | [Uint8Array | number[]]],
Result_3
>,
'admin_deploy_bucket' : ActorMethod<
[DeployWasmInput, [] | [Uint8Array | number[]]],
Result_1
Expand Down Expand Up @@ -213,6 +217,10 @@ export interface _SERVICE {
[[] | [CanisterSettings], [] | [Uint8Array | number[]]],
Result_11
>,
'validate_admin_create_bucket_on' : ActorMethod<
[Principal, [] | [CanisterSettings], [] | [Uint8Array | number[]]],
Result_11
>,
'validate_admin_deploy_bucket' : ActorMethod<
[DeployWasmInput, [] | [Uint8Array | number[]]],
Result_1
Expand Down
10 changes: 10 additions & 0 deletions src/ic_oss_ts/candid/ic_oss_cluster/ic_oss_cluster.did.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ export const idlFactory = ({ IDL }) => {
[Result_3],
[],
),
'admin_create_bucket_on' : IDL.Func(
[IDL.Principal, IDL.Opt(CanisterSettings), IDL.Opt(IDL.Vec(IDL.Nat8))],
[Result_3],
[],
),
'admin_deploy_bucket' : IDL.Func(
[DeployWasmInput, IDL.Opt(IDL.Vec(IDL.Nat8))],
[Result_1],
Expand Down Expand Up @@ -258,6 +263,11 @@ export const idlFactory = ({ IDL }) => {
[Result_11],
[],
),
'validate_admin_create_bucket_on' : IDL.Func(
[IDL.Principal, IDL.Opt(CanisterSettings), IDL.Opt(IDL.Vec(IDL.Nat8))],
[Result_11],
[],
),
'validate_admin_deploy_bucket' : IDL.Func(
[DeployWasmInput, IDL.Opt(IDL.Vec(IDL.Nat8))],
[Result_1],
Expand Down
30 changes: 15 additions & 15 deletions src/ic_oss_ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ldclabs/ic_oss_ts",
"version": "0.9.11",
"version": "1.0.0",
"type": "module",
"description": "The Typescript version of the client SDK for the ic-oss cluster.",
"license": "MIT",
Expand Down Expand Up @@ -35,25 +35,25 @@
"ncu": "npx npm-check-updates -u"
},
"dependencies": {
"@dfinity/agent": "^2.2.0",
"@dfinity/candid": "^2.2.0",
"@dfinity/principal": "^2.2.0",
"@dfinity/utils": "^2.7.1",
"@noble/hashes": "^1.6.1",
"@dfinity/agent": "^2.3.0",
"@dfinity/candid": "^2.3.0",
"@dfinity/principal": "^2.3.0",
"@dfinity/utils": "^2.10.0",
"@noble/hashes": "^1.7.1",
"mime": "^4.0.6",
"web-streams-polyfill": "^4.0.0"
"web-streams-polyfill": "^4.1.0"
},
"devDependencies": {
"@types/eslint": "^9.6.1",
"@types/node": "22.10.2",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/parser": "^8.18.1",
"eslint": "^9.17.0",
"eslint-config-prettier": "^9.1.0",
"@types/node": "22.13.1",
"@typescript-eslint/eslint-plugin": "^8.23.0",
"@typescript-eslint/parser": "^8.23.0",
"eslint": "^9.20.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-prettier": "^5.2.3",
"prettier": "^3.4.2",
"typescript": "^5.7.2",
"vitest": "^2.1.8"
"typescript": "^5.7.3",
"vitest": "^3.0.5"
}
}
2 changes: 1 addition & 1 deletion src/ic_oss_types/src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::{format_error, MapValue};

pub const CHUNK_SIZE: u32 = 256 * 1024;
pub const MAX_FILE_SIZE: u64 = 384 * 1024 * 1024 * 1024; // 384GB
pub const MAX_FILE_SIZE_PER_CALL: u64 = 1024 * 2000; // should less than 2MB
pub const MAX_FILE_SIZE_PER_CALL: u64 = 1024 * 2048; // should less than 2MB

pub static CUSTOM_KEY_BY_HASH: &str = "by_hash";

Expand Down

0 comments on commit 5b2e7ae

Please sign in to comment.