From 3e9e795365e56bff2fc0d4afefe5526723178061 Mon Sep 17 00:00:00 2001 From: Thorsten Lorenz Date: Mon, 21 Aug 2023 18:55:02 +0700 Subject: [PATCH] chore: rename to sdk --- README.md | 4 ++-- package.json | 8 ++++---- src/{platform-sdk.ts => sdk.ts} | 2 +- test/accounts-sdk.ts | 14 +++++++------- 4 files changed, 14 insertions(+), 14 deletions(-) rename src/{platform-sdk.ts => sdk.ts} (94%) diff --git a/README.md b/README.md index 41e313f..1241504 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# @ironforge-cloud/platform-sdk [![Build+Test+Lint](https://github.com/ironforge-cloud/platform-sdk/actions/workflows/build-test-lint.yml/badge.svg)](https://github.com/ironforge-cloud/platform-sdk/actions/workflows/build-test-lint.yml) +# @ironforge-cloud/sdk [![Build+Test+Lint](https://github.com/ironforge-cloud/sdk/actions/workflows/build-test-lint.yml/badge.svg)](https://github.com/ironforge-cloud/sdk/actions/workflows/build-test-lint.yml) -IronForge platform SDK +IronForge SDK ## LICENSE diff --git a/package.json b/package.json index febdc14..4cc3c25 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "@ironforge-cloud/platform-sdk", + "name": "@ironforge-cloud/sdk", "version": "0.0.0", - "description": "IronForge platform SDK.", - "main": "src/platform-sdk.ts", - "types": "src/platform-sdk.ts", + "description": "IronForge SDK.", + "main": "src/sdk.ts", + "types": "src/sdk.ts", "scripts": { "build": "tsc", "lint": "prettier --check .", diff --git a/src/platform-sdk.ts b/src/sdk.ts similarity index 94% rename from src/platform-sdk.ts rename to src/sdk.ts index 9e7e851..b767d45 100644 --- a/src/platform-sdk.ts +++ b/src/sdk.ts @@ -6,7 +6,7 @@ export * from './accounts' export * from './types' export { accountsHostForEnv } from './utils' -export class PlatformSdk { +export class IronforgeSdk { private readonly _accountsHost: string constructor( public apiKey: string, diff --git a/test/accounts-sdk.ts b/test/accounts-sdk.ts index 0edd266..fca5c56 100644 --- a/test/accounts-sdk.ts +++ b/test/accounts-sdk.ts @@ -1,6 +1,6 @@ import test from 'node:test' import assert from 'assert/strict' -import { PlatformSdk } from '../src/platform-sdk' +import { IronforgeSdk } from '../src/sdk' import spok from 'spok' const API_KEY = process.env.IF_PLATFORM_API_KEY @@ -10,7 +10,7 @@ if (API_KEY == null) throw new Error('IF_PLATFORM_API_KEY not set') // Aggregate // ----------------- test('accounts-sdk: aggregate', async () => { - const sdk = new PlatformSdk(API_KEY) + const sdk = new IronforgeSdk(API_KEY) const { result, status } = await sdk.accounts.aggregate({ query: { pipeline: [ @@ -53,7 +53,7 @@ test('accounts-sdk: aggregate', async () => { // Filter By Type // ----------------- test('accounts-sdk: filter by type', async (t) => { - const sdk = new PlatformSdk(API_KEY) + const sdk = new IronforgeSdk(API_KEY) const { result, status } = await sdk.accounts.filterByType({ accountType: 'CandyMachine', query: { filter: { 'data.data.price': 250 } }, @@ -74,7 +74,7 @@ test('accounts-sdk: filter by type', async (t) => { // Filter // ----------------- test('accounts-sdk: filter', async (t) => { - const sdk = new PlatformSdk(API_KEY) + const sdk = new IronforgeSdk(API_KEY) const { result, status } = await sdk.accounts.filter({ query: { filter: { 'data.data.price': 250 } }, cluster: 'devnet', @@ -94,7 +94,7 @@ test('accounts-sdk: filter', async (t) => { // Find By Type // ----------------- test('accounts-sdk: find by type', async (t) => { - const sdk = new PlatformSdk(API_KEY) + const sdk = new IronforgeSdk(API_KEY) const { result, status } = await sdk.accounts.findByType({ accountType: 'CandyMachine', cluster: 'devnet', @@ -117,7 +117,7 @@ test('accounts-sdk: find by type', async (t) => { // FindOne // ----------------- test('accounts-sdk: findOne', async (t) => { - const sdk = new PlatformSdk(API_KEY) + const sdk = new IronforgeSdk(API_KEY) const { result, status } = await sdk.accounts.findOne({ cluster: 'devnet', program: 'cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ', @@ -148,7 +148,7 @@ test('accounts-sdk: findOne', async (t) => { // Memcmp // ----------------- test('accounts-sdk: memcmp', async (t) => { - const sdk = new PlatformSdk(API_KEY) + const sdk = new IronforgeSdk(API_KEY) const { result, status } = await sdk.accounts.memcmp({ query: { filters: [