Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

appwrite-utils

Package Overview
Dependencies
Maintainers
0
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appwrite-utils - npm Package Compare versions

Comparing version 0.3.96 to 0.3.97

dist/schemas/appwriteRequest.d.ts

6

dist/index.d.ts

@@ -29,1 +29,7 @@ export { areCollectionNamesSame } from "./functions/collections.js";

export { SpecificationSchema, type Specification } from "./schemas/specifications.js";
export { AppwriteRequest } from "./schemas/appwriteRequest.js";
export { AppwriteResponse } from "./schemas/appwriteResponse.js";
export { AppwriteFunctionSchema, type AppwriteFunction } from "./schemas/functions.js";
export { FunctionScopes, type FunctionScope } from "./schemas/functionScopes.js";
export { FunctionSpecifications, type FunctionSpecification } from "./schemas/functionSpecifications.js";
export { RuntimeSchema, type Runtime } from "./schemas/runtime.js";

@@ -28,1 +28,6 @@ export { areCollectionNamesSame } from "./functions/collections.js";

export { SpecificationSchema } from "./schemas/specifications.js";
export { AppwriteRequest } from "./schemas/appwriteRequest.js";
export { AppwriteFunctionSchema } from "./schemas/functions.js";
export { FunctionScopes } from "./schemas/functionScopes.js";
export { FunctionSpecifications } from "./schemas/functionSpecifications.js";
export { RuntimeSchema } from "./schemas/runtime.js";
import { z } from "zod";
import { CollectionCreateSchema, } from "./collection.js";
import { BucketSchema } from "./bucket.js";
import { AppwriteFunctionSchema } from "./functions.js";
export const AppwriteConfigSchema = z.object({

@@ -56,2 +57,6 @@ appwriteEndpoint: z.string().default("https://cloud.appwrite.io/v1"),

.describe("Collections to create, $id is the id of the collection, it'll always check by collection name and $id for existing before creating another"),
functions: z
.array(AppwriteFunctionSchema)
.optional()
.describe("Functions to create"),
});

1

dist/schemas/specifications.d.ts
import { z } from "zod";
export declare const SpecificationSchema: z.ZodNativeEnum<{
readonly HALF_CPU_HALF_GIG_RAM: "s-0.5vcpu-512mb";
readonly ONE_CPU_HALF_GIG_RAM: "s-1vcpu-512mb";
readonly ONE_CPU_ONE_GIG_RAM: "s-1vcpu-1gb";

@@ -5,0 +6,0 @@ readonly TWO_CPU_TWO_GIG_RAM: "s-2vcpu-2gb";

import { z } from "zod";
const SPECIFICATIONS = {
HALF_CPU_HALF_GIG_RAM: "s-0.5vcpu-512mb",
ONE_CPU_HALF_GIG_RAM: "s-1vcpu-512mb",
ONE_CPU_ONE_GIG_RAM: "s-1vcpu-1gb",

@@ -5,0 +6,0 @@ TWO_CPU_TWO_GIG_RAM: "s-2vcpu-2gb",

2

package.json
{
"name": "appwrite-utils",
"module": "dist/index.js",
"version": "0.3.96",
"version": "0.3.97",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "types": "dist/index.d.ts",

@@ -29,6 +29,30 @@ # appwrite-utils

```typescript
isNumber, isString, isBoolean, isArray, isObject, isNull, isUndefined, isDefined, isDate,
isEmpty, isInteger, isFloat, isArrayLike, isArrayLikeObject, isFunction, isLength, isMap,
isSet, isRegExp, isSymbol, isObjectLike, isPlainObject, isSafeInteger, isTypedArray,
isEqual, isMatch, has, get
isNumber,
isString,
isBoolean,
isArray,
isObject,
isNull,
isUndefined,
isDefined,
isDate,
isEmpty,
isInteger,
isFloat,
isArrayLike,
isArrayLikeObject,
isFunction,
isLength,
isMap,
isSet,
isRegExp,
isSymbol,
isObjectLike,
isPlainObject,
isSafeInteger,
isTypedArray,
isEqual,
isMatch,
has,
get;
```

@@ -41,9 +65,35 @@

```typescript
anyToString, anyToNumber, anyToBoolean, anyToAnyArray, anyToStringArray,
trySplitByDifferentSeparators, removeStartEndQuotes, splitByComma, splitByPipe,
splitBySemicolon, splitByColon, splitBySlash, splitByBackslash, splitBySpace,
splitByDot, splitByUnderscore, splitByHyphen, pickFirstElement, pickLastElement,
stringifyObject, parseObject, safeParseDate, removeInvalidElements, joinValues,
joinBySpace, joinByComma, joinByPipe, joinBySemicolon, joinByColon, joinBySlash,
joinByHyphen, convertPhoneStringToUSInternational, validateOrNullEmail
anyToString,
anyToNumber,
anyToBoolean,
anyToAnyArray,
anyToStringArray,
trySplitByDifferentSeparators,
removeStartEndQuotes,
splitByComma,
splitByPipe,
splitBySemicolon,
splitByColon,
splitBySlash,
splitByBackslash,
splitBySpace,
splitByDot,
splitByUnderscore,
splitByHyphen,
pickFirstElement,
pickLastElement,
stringifyObject,
parseObject,
safeParseDate,
removeInvalidElements,
joinValues,
joinBySpace,
joinByComma,
joinByPipe,
joinBySemicolon,
joinByColon,
joinBySlash,
joinByHyphen,
convertPhoneStringToUSInternational,
validateOrNullEmail;
```

@@ -56,3 +106,3 @@

```typescript
getFileViewUrl, getFileDownloadUrl
getFileViewUrl, getFileDownloadUrl;
```

@@ -67,7 +117,7 @@

```typescript
import { isNumber, anyToString } from 'appwrite-utils';
import { isNumber, anyToString } from "appwrite-utils";
// Use the functions directly in your code
console.log(isNumber(5)); // Output: true
console.log(anyToString(1234)); // Output: "1234"
console.log(isNumber(5)); // Output: true
console.log(anyToString(1234)); // Output: "1234"
```

@@ -79,2 +129,6 @@

- 0.3.97: Added function deployment through Appwrite Utils CLI, specified through AppwriteConfig, as the current deployment for Appwrite ignored specifications and I wanted to add an `evalSync` to run commands pre-build. That means you can deploy a `TypeScript Node` project, and build it first, programmatically! These are just types, and only defined in `AppwriteUtils` to try to keep some semblence of usefulness in both. I also added `FunctionSpecifications` type defs, `FunctionScopes`, `AppwriteRequest` (A type definition for the request incoming to the Appwrite Function), `AppwriteResponse` (A type definition for the response of course).
I also fixed `transfer` to actually transfer
- 0.3.96: Added `SpecificationSchema, type Specification` type defs to support updating function specifications

@@ -81,0 +135,0 @@ - 0.3.95: Updated `safeParseDate` to handle formats like `8:00AM` vs `8:00 AM` -- spaces matter!

@@ -0,0 +0,0 @@ import { AppwriteException } from "appwrite";

import { z } from "zod";
import { FunctionScopes } from "./schemas/functionScopes.js";

@@ -113,1 +114,7 @@ export { areCollectionNamesSame } from "./functions/collections.js";

export { SpecificationSchema, type Specification } from "./schemas/specifications.js";
export { AppwriteRequest } from "./schemas/appwriteRequest.js";
export { AppwriteResponse } from "./schemas/appwriteResponse.js";
export { AppwriteFunctionSchema, type AppwriteFunction } from "./schemas/functions.js";
export { FunctionScopes, type FunctionScope } from "./schemas/functionScopes.js";
export { FunctionSpecifications, type FunctionSpecification } from "./schemas/functionSpecifications.js";
export { RuntimeSchema, type Runtime } from "./schemas/runtime.js";

@@ -8,2 +8,3 @@ import { z } from "zod";

import { BucketSchema } from "./bucket.js";
import { AppwriteFunctionSchema } from "./functions.js";

@@ -69,2 +70,6 @@ export const AppwriteConfigSchema = z.object({

),
functions: z
.array(AppwriteFunctionSchema)
.optional()
.describe("Functions to create"),
});

@@ -71,0 +76,0 @@

@@ -5,2 +5,3 @@ import { z } from "zod";

HALF_CPU_HALF_GIG_RAM: "s-0.5vcpu-512mb",
ONE_CPU_HALF_GIG_RAM: "s-1vcpu-512mb",
ONE_CPU_ONE_GIG_RAM: "s-1vcpu-1gb",

@@ -7,0 +8,0 @@ TWO_CPU_TWO_GIG_RAM: "s-2vcpu-2gb",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc