Compare commits

..
Author SHA1 Message Date
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
4f79053ec3 Version Packages (#1446)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-04 10:41:06 -07:00
Joaquim VergesandGitHub 2a91113a76 [SDK] Revert sanitizing inputs (#1449) 2023-08-04 10:31:04 -07:00
Danny FridayandGitHub b103872daf Export extractAuthorizationData for CF Workers (#1447) 2023-08-03 23:54:08 +00:00
Mariano FuentesandGitHub 7f54012ec6 CLI warnings (#1442) 2023-08-03 22:48:25 +00:00
23 changed files with 103 additions and 41 deletions
+7
View File
@@ -1,5 +1,12 @@
# @thirdweb-dev/auth
## 3.2.26
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/wallets@1.1.9
## 3.2.25
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/auth",
"version": "3.2.25",
"version": "3.2.26",
"main": "dist/thirdweb-dev-auth.cjs.js",
"module": "dist/thirdweb-dev-auth.esm.js",
"browser": {
+9
View File
@@ -1,5 +1,14 @@
# thirdweb
## 0.11.9
### Patch Changes
- [#1442](https://github.com/thirdweb-dev/js/pull/1442) [`7f54012e`](https://github.com/thirdweb-dev/js/commit/7f54012ec648b727b60784990e71b0efb4690934) Thanks [@Marfuen](https://github.com/Marfuen)! - - Warn users on windows to not use the powershell as there are some compatibility issues with it at the moment.
- Warn users if they are pasting a client id instead of a secret key.
- Updated dependencies [[`2a91113a`](https://github.com/thirdweb-dev/js/commit/2a91113a760733fcff2aec90041f69e15de33905)]:
- @thirdweb-dev/sdk@3.10.45
## 0.11.8
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "thirdweb",
"main": "dist/cli/index.js",
"version": "0.11.8",
"version": "0.11.9",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+19
View File
@@ -2,6 +2,7 @@ import chalk from "chalk";
import prompts from "prompts";
import Cache, { CacheEntry } from "sync-disk-cache";
import { ApiResponse } from "../lib/types";
import os from "os";
export async function loginUser(
cache: Cache,
@@ -40,6 +41,10 @@ export function getSession(cache: Cache) {
export async function createSession(cache: Cache) {
try {
const isWindows = os.type() === "Windows_NT";
if (isWindows) {
console.log(chalk.yellow("Windows detected: if you are using powershell, there are some known issues with it that we are actively working on, please use git bash or the command prompt. Thank you for your understanding."));
}
const response = await prompts({
type: "invisible",
name: "apiSecretKey",
@@ -48,6 +53,20 @@ export async function createSession(cache: Cache) {
)}`,
});
const keyPassed = response.apiSecretKey;
if (!keyPassed) {
console.log(chalk.red("You need to pass an API secret key"));
process.exit(1);
}
if (keyPassed.length === 32) {
console.log(chalk.red(`This is not a valid secret key. To get your secret key
1. Create an API key at https://thirdweb.com/create-api-key
2. Store and copy your Secret Key. This will be shown only once.
3. Paste it in the CLI when prompted`));
process.exit(1);
}
try {
await validateKey(response.apiSecretKey);
} catch (error) {
+8
View File
@@ -1,5 +1,13 @@
# @thirdweb-dev/react-core
## 3.14.26
### Patch Changes
- Updated dependencies [[`2a91113a`](https://github.com/thirdweb-dev/js/commit/2a91113a760733fcff2aec90041f69e15de33905)]:
- @thirdweb-dev/sdk@3.10.45
- @thirdweb-dev/wallets@1.1.9
## 3.14.25
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react-core",
"version": "3.14.25",
"version": "3.14.26",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
@@ -1,5 +1,7 @@
# @thirdweb-dev/react-native-compat
## 0.2.45
## 0.2.44
## 0.2.43
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@thirdweb-dev/react-native-compat",
"description": "Shims for Thirdweb in React Native Projects",
"version": "0.2.44",
"version": "0.2.45",
"author": "thirdweb eng <[email protected]>",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat",
"license": "Apache-2.0",
+9
View File
@@ -1,5 +1,14 @@
# @thirdweb-dev/react-native
## 0.2.45
### Patch Changes
- Updated dependencies [[`2a91113a`](https://github.com/thirdweb-dev/js/commit/2a91113a760733fcff2aec90041f69e15de33905)]:
- @thirdweb-dev/sdk@3.10.45
- @thirdweb-dev/react-core@3.14.26
- @thirdweb-dev/wallets@1.1.9
## 0.2.44
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react-native",
"version": "0.2.44",
"version": "0.2.45",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+9
View File
@@ -1,5 +1,14 @@
# @thirdweb-dev/react
## 3.14.26
### Patch Changes
- Updated dependencies [[`2a91113a`](https://github.com/thirdweb-dev/js/commit/2a91113a760733fcff2aec90041f69e15de33905)]:
- @thirdweb-dev/sdk@3.10.45
- @thirdweb-dev/react-core@3.14.26
- @thirdweb-dev/wallets@1.1.9
## 3.14.25
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react",
"version": "3.14.25",
"version": "3.14.26",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+6
View File
@@ -1,5 +1,11 @@
# @thirdweb-dev/sdk
## 3.10.45
### Patch Changes
- [#1449](https://github.com/thirdweb-dev/js/pull/1449) [`2a91113a`](https://github.com/thirdweb-dev/js/commit/2a91113a760733fcff2aec90041f69e15de33905) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Revert sanitizing inputs
## 3.10.44
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/sdk",
"version": "3.10.44",
"version": "3.10.45",
"description": "The main thirdweb SDK.",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk",
"license": "Apache-2.0",
+1 -30
View File
@@ -12,41 +12,12 @@ import { z } from "zod";
export const BasicNFTInput = /* @__PURE__ */ (() =>
z.object({
name: z.union([z.string(), z.number()]).optional().nullable(),
description: z
.string()
.nullable()
.optional()
.nullable()
.transform((i) => {
return sanitizeJSONString(i);
}),
description: z.string().nullable().optional().nullable(),
image: FileOrBufferOrStringSchema.nullable().optional(),
animation_url: FileOrBufferOrStringSchema.optional().nullable(),
}))();
function sanitizeJSONString(val: string | undefined | null) {
if (!val) {
return val;
}
return JSON.parse(JSON.stringify(val, escape));
}
function escape(key: string, val: any) {
if (typeof val !== "string") {
return val;
}
return val
.replace(/[\"]/g, '\\"')
.replace(/[\\]/g, "\\\\")
.replace(/[\/]/g, "\\/")
.replace(/[\b]/g, "\\b")
.replace(/[\f]/g, "\\f")
.replace(/[\n]/g, "\\n")
.replace(/[\r]/g, "\\r")
.replace(/[\t]/g, "\\t");
}
/**
* @internal
*/
+6
View File
@@ -1,5 +1,11 @@
# @thirdweb-dev/service-utils
## 0.3.1
### Patch Changes
- [#1447](https://github.com/thirdweb-dev/js/pull/1447) [`b103872d`](https://github.com/thirdweb-dev/js/commit/b103872daff87b032082a433713d16b9dee13082) Thanks [@nessup](https://github.com/nessup)! - Export extractAuthorizationData for CF Workers
## 0.3.0
### Minor Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/service-utils",
"version": "0.3.0",
"version": "0.3.1",
"main": "dist/thirdweb-dev-service-utils.cjs.js",
"module": "dist/thirdweb-dev-service-utils.esm.js",
"exports": {
@@ -73,7 +73,7 @@ export async function authorizeWorker(
});
}
async function extractAuthorizationData(
export async function extractAuthorizationData(
authInput: AuthInput,
): Promise<AuthorizationInput> {
const requestUrl = new URL(authInput.req.url);
+9
View File
@@ -1,5 +1,14 @@
# @thirdweb-dev/unity-js-bridge
## 0.2.63
### Patch Changes
- Updated dependencies [[`2a91113a`](https://github.com/thirdweb-dev/js/commit/2a91113a760733fcff2aec90041f69e15de33905)]:
- @thirdweb-dev/sdk@3.10.45
- @thirdweb-dev/wallets@1.1.9
- @thirdweb-dev/auth@3.2.26
## 0.2.62
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/unity-js-bridge",
"version": "0.2.62",
"version": "0.2.63",
"main": "dist/thirdweb-unity-bridge.js",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/unity-js-bridge",
"license": "Apache-2.0",
+7
View File
@@ -1,5 +1,12 @@
# @thirdweb-dev/wallets
## 1.1.9
### Patch Changes
- Updated dependencies [[`2a91113a`](https://github.com/thirdweb-dev/js/commit/2a91113a760733fcff2aec90041f69e15de33905)]:
- @thirdweb-dev/sdk@3.10.45
## 1.1.8
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/wallets",
"version": "1.1.8",
"version": "1.1.9",
"main": "dist/thirdweb-dev-wallets.cjs.js",
"module": "dist/thirdweb-dev-wallets.esm.js",
"types": "dist/thirdweb-dev-wallets.cjs.d.ts",