@meistrari/tela-sdk-js 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,9 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const changeCase = require('change-case');
4
- const micromatch = require('micromatch');
5
-
6
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
4
+ const minimatch = require('minimatch');
7
5
 
8
6
  function _interopNamespaceCompat(e) {
9
7
  if (e && typeof e === 'object' && 'default' in e) return e;
@@ -18,9 +16,8 @@ function _interopNamespaceCompat(e) {
18
16
  }
19
17
 
20
18
  const changeCase__namespace = /*#__PURE__*/_interopNamespaceCompat(changeCase);
21
- const micromatch__default = /*#__PURE__*/_interopDefaultCompat(micromatch);
22
19
 
23
- const version = "1.0.0";
20
+ const version = "1.0.2";
24
21
 
25
22
  var __defProp$5 = Object.defineProperty;
26
23
  var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -210,8 +207,12 @@ const DEFAULT_FIELDS_TRANSFORMATION_EXCLUSIONS = [
210
207
 
211
208
  function isExcluded(path, exclusions) {
212
209
  return exclusions.some((pattern) => {
213
- const isMatch = micromatch__default.isMatch(path, pattern);
214
- return isMatch;
210
+ return minimatch.minimatch(path, pattern, {
211
+ dot: true,
212
+ nobrace: false,
213
+ noglobstar: false,
214
+ matchBase: false
215
+ });
215
216
  });
216
217
  }
217
218
  function transformObjectFromCamelCaseToSnakeCase(obj, exclusions = []) {
@@ -1190,7 +1191,7 @@ class ChatCompletions extends Resource {
1190
1191
  "Content-Type": contentType,
1191
1192
  ...file.size ? { "Content-Length": file.size.toString() } : {}
1192
1193
  },
1193
- // @ts-expect-error: duplex is not supported
1194
+ // duplex is not supported
1194
1195
  duplex: "half"
1195
1196
  });
1196
1197
  if (!uploadResponse.ok) {
package/dist/index.d.cts CHANGED
@@ -238,6 +238,14 @@ declare class TelaFile {
238
238
  */
239
239
  declare function createTelaFile(file: TelaFileInput, options?: TelaFileOptions): TelaFile;
240
240
 
241
+ /**
242
+ * Base class for all resources.
243
+ */
244
+ declare class Resource {
245
+ protected _client: BaseClient;
246
+ constructor(client: BaseClient);
247
+ }
248
+
241
249
  /**
242
250
  * Represents a stream of items that can be asynchronously iterated over.
243
251
  */
@@ -294,14 +302,6 @@ declare class Stream<Item> implements AsyncIterable<Item> {
294
302
  toReadableStream(): ReadableStream;
295
303
  }
296
304
 
297
- /**
298
- * Base class for all resources.
299
- */
300
- declare class Resource {
301
- protected _client: BaseClient;
302
- constructor(client: BaseClient);
303
- }
304
-
305
305
  /**
306
306
  * Manages chat completion operations.
307
307
  *
package/dist/index.d.mts CHANGED
@@ -238,6 +238,14 @@ declare class TelaFile {
238
238
  */
239
239
  declare function createTelaFile(file: TelaFileInput, options?: TelaFileOptions): TelaFile;
240
240
 
241
+ /**
242
+ * Base class for all resources.
243
+ */
244
+ declare class Resource {
245
+ protected _client: BaseClient;
246
+ constructor(client: BaseClient);
247
+ }
248
+
241
249
  /**
242
250
  * Represents a stream of items that can be asynchronously iterated over.
243
251
  */
@@ -294,14 +302,6 @@ declare class Stream<Item> implements AsyncIterable<Item> {
294
302
  toReadableStream(): ReadableStream;
295
303
  }
296
304
 
297
- /**
298
- * Base class for all resources.
299
- */
300
- declare class Resource {
301
- protected _client: BaseClient;
302
- constructor(client: BaseClient);
303
- }
304
-
305
305
  /**
306
306
  * Manages chat completion operations.
307
307
  *
package/dist/index.d.ts CHANGED
@@ -238,6 +238,14 @@ declare class TelaFile {
238
238
  */
239
239
  declare function createTelaFile(file: TelaFileInput, options?: TelaFileOptions): TelaFile;
240
240
 
241
+ /**
242
+ * Base class for all resources.
243
+ */
244
+ declare class Resource {
245
+ protected _client: BaseClient;
246
+ constructor(client: BaseClient);
247
+ }
248
+
241
249
  /**
242
250
  * Represents a stream of items that can be asynchronously iterated over.
243
251
  */
@@ -294,14 +302,6 @@ declare class Stream<Item> implements AsyncIterable<Item> {
294
302
  toReadableStream(): ReadableStream;
295
303
  }
296
304
 
297
- /**
298
- * Base class for all resources.
299
- */
300
- declare class Resource {
301
- protected _client: BaseClient;
302
- constructor(client: BaseClient);
303
- }
304
-
305
305
  /**
306
306
  * Manages chat completion operations.
307
307
  *
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as changeCase from 'change-case';
2
- import micromatch from 'micromatch';
2
+ import { minimatch } from 'minimatch';
3
3
 
4
- const version = "1.0.0";
4
+ const version = "1.0.2";
5
5
 
6
6
  var __defProp$5 = Object.defineProperty;
7
7
  var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -191,8 +191,12 @@ const DEFAULT_FIELDS_TRANSFORMATION_EXCLUSIONS = [
191
191
 
192
192
  function isExcluded(path, exclusions) {
193
193
  return exclusions.some((pattern) => {
194
- const isMatch = micromatch.isMatch(path, pattern);
195
- return isMatch;
194
+ return minimatch(path, pattern, {
195
+ dot: true,
196
+ nobrace: false,
197
+ noglobstar: false,
198
+ matchBase: false
199
+ });
196
200
  });
197
201
  }
198
202
  function transformObjectFromCamelCaseToSnakeCase(obj, exclusions = []) {
@@ -1171,7 +1175,7 @@ class ChatCompletions extends Resource {
1171
1175
  "Content-Type": contentType,
1172
1176
  ...file.size ? { "Content-Length": file.size.toString() } : {}
1173
1177
  },
1174
- // @ts-expect-error: duplex is not supported
1178
+ // duplex is not supported
1175
1179
  duplex: "half"
1176
1180
  });
1177
1181
  if (!uploadResponse.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/tela-sdk-js",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,18 +33,15 @@
33
33
  "lint": "eslint . --fix",
34
34
  "lint:fix": "eslint . --fix",
35
35
  "check": "eslint . --quiet && tsc --noEmit",
36
- "prepack": "bun run build",
37
- "postinstall": "bunx playwright install --with-deps chromium"
36
+ "prepack": "bun run build"
38
37
  },
39
38
  "dependencies": {
40
39
  "change-case": "5.4.4",
41
- "micromatch": "4.0.8"
40
+ "minimatch": "10.0.1"
42
41
  },
43
42
  "devDependencies": {
44
43
  "@antfu/eslint-config": "3.0.0",
45
- "@rollup/plugin-inject": "5.0.5",
46
44
  "@types/bun": "latest",
47
- "@types/micromatch": "4.0.9",
48
45
  "@types/node": "22.5.5",
49
46
  "@vitest/browser": "^3.0.8",
50
47
  "husky": "9.1.6",
@@ -55,7 +52,7 @@
55
52
  "vitest": "3.0.8"
56
53
  },
57
54
  "peerDependencies": {
58
- "typescript": "5.6.0"
55
+ "typescript": "5.8.2"
59
56
  },
60
57
  "lint-staged": {
61
58
  "*.{js,ts}": [