@pelican.ts/sdk 0.4.16-next.1 → 0.4.16-next.3

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.
@@ -560,10 +560,10 @@ declare const CreateServerSchema: z.ZodObject<{
560
560
  allocations: z.ZodNumber;
561
561
  backups: z.ZodNumber;
562
562
  }, z.core.$strip>;
563
- allocation: z.ZodOptional<z.ZodObject<{
564
- default: z.ZodNullable<z.ZodString>;
563
+ allocation: z.ZodObject<{
564
+ default: z.ZodString;
565
565
  additional: z.ZodOptional<z.ZodArray<z.ZodString>>;
566
- }, z.core.$strip>>;
566
+ }, z.core.$strip>;
567
567
  deploy: z.ZodOptional<z.ZodObject<{
568
568
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
569
569
  dedicated_ip: z.ZodOptional<z.ZodBoolean>;
@@ -560,10 +560,10 @@ declare const CreateServerSchema: z.ZodObject<{
560
560
  allocations: z.ZodNumber;
561
561
  backups: z.ZodNumber;
562
562
  }, z.core.$strip>;
563
- allocation: z.ZodOptional<z.ZodObject<{
564
- default: z.ZodNullable<z.ZodString>;
563
+ allocation: z.ZodObject<{
564
+ default: z.ZodString;
565
565
  additional: z.ZodOptional<z.ZodArray<z.ZodString>>;
566
- }, z.core.$strip>>;
566
+ }, z.core.$strip>;
567
567
  deploy: z.ZodOptional<z.ZodObject<{
568
568
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
569
569
  dedicated_ip: z.ZodOptional<z.ZodBoolean>;
package/dist/api/index.js CHANGED
@@ -444,9 +444,9 @@ var CreateServerSchema = import_zod6.default.object({
444
444
  backups: import_zod6.default.number().min(0)
445
445
  }),
446
446
  allocation: import_zod6.default.object({
447
- default: import_zod6.default.string().nullable(),
447
+ default: import_zod6.default.string(),
448
448
  additional: import_zod6.default.array(import_zod6.default.string()).optional()
449
- }).optional(),
449
+ }),
450
450
  deploy: import_zod6.default.object({
451
451
  tags: import_zod6.default.array(import_zod6.default.string()).optional(),
452
452
  dedicated_ip: import_zod6.default.boolean().optional(),
@@ -1415,7 +1415,10 @@ var ServerFiles = class {
1415
1415
  contents = async (path) => {
1416
1416
  const { data } = await this.r.get(
1417
1417
  `/servers/${this.id}/files/contents`,
1418
- { params: { file: path } }
1418
+ {
1419
+ params: { file: path },
1420
+ responseType: "text"
1421
+ }
1419
1422
  );
1420
1423
  return data;
1421
1424
  };
@@ -407,9 +407,9 @@ var CreateServerSchema = z6.object({
407
407
  backups: z6.number().min(0)
408
408
  }),
409
409
  allocation: z6.object({
410
- default: z6.string().nullable(),
410
+ default: z6.string(),
411
411
  additional: z6.array(z6.string()).optional()
412
- }).optional(),
412
+ }),
413
413
  deploy: z6.object({
414
414
  tags: z6.array(z6.string()).optional(),
415
415
  dedicated_ip: z6.boolean().optional(),
@@ -1378,7 +1378,10 @@ var ServerFiles = class {
1378
1378
  contents = async (path) => {
1379
1379
  const { data } = await this.r.get(
1380
1380
  `/servers/${this.id}/files/contents`,
1381
- { params: { file: path } }
1381
+ {
1382
+ params: { file: path },
1383
+ responseType: "text"
1384
+ }
1382
1385
  );
1383
1386
  return data;
1384
1387
  };
package/dist/index.js CHANGED
@@ -129,9 +129,9 @@ var CreateServerSchema = import_zod6.default.object({
129
129
  backups: import_zod6.default.number().min(0)
130
130
  }),
131
131
  allocation: import_zod6.default.object({
132
- default: import_zod6.default.string().nullable(),
132
+ default: import_zod6.default.string(),
133
133
  additional: import_zod6.default.array(import_zod6.default.string()).optional()
134
- }).optional(),
134
+ }),
135
135
  deploy: import_zod6.default.object({
136
136
  tags: import_zod6.default.array(import_zod6.default.string()).optional(),
137
137
  dedicated_ip: import_zod6.default.boolean().optional(),
@@ -981,7 +981,10 @@ var ServerFiles = class {
981
981
  contents = async (path2) => {
982
982
  const { data } = await this.r.get(
983
983
  `/servers/${this.id}/files/contents`,
984
- { params: { file: path2 } }
984
+ {
985
+ params: { file: path2 },
986
+ responseType: "text"
987
+ }
985
988
  );
986
989
  return data;
987
990
  };
@@ -1881,7 +1884,7 @@ var ServerFile = class _ServerFile {
1881
1884
  size;
1882
1885
  constructor(client, file, dir = "/") {
1883
1886
  this.client = client;
1884
- this.dir = dir;
1887
+ this.dir = dir || "/";
1885
1888
  this.createdAt = new Date(file.created_at);
1886
1889
  this.isFile = file.is_file;
1887
1890
  this.isSymlink = file.is_symlink;
package/dist/index.mjs CHANGED
@@ -84,9 +84,9 @@ var CreateServerSchema = z6.object({
84
84
  backups: z6.number().min(0)
85
85
  }),
86
86
  allocation: z6.object({
87
- default: z6.string().nullable(),
87
+ default: z6.string(),
88
88
  additional: z6.array(z6.string()).optional()
89
- }).optional(),
89
+ }),
90
90
  deploy: z6.object({
91
91
  tags: z6.array(z6.string()).optional(),
92
92
  dedicated_ip: z6.boolean().optional(),
@@ -936,7 +936,10 @@ var ServerFiles = class {
936
936
  contents = async (path2) => {
937
937
  const { data } = await this.r.get(
938
938
  `/servers/${this.id}/files/contents`,
939
- { params: { file: path2 } }
939
+ {
940
+ params: { file: path2 },
941
+ responseType: "text"
942
+ }
940
943
  );
941
944
  return data;
942
945
  };
@@ -1836,7 +1839,7 @@ var ServerFile = class _ServerFile {
1836
1839
  size;
1837
1840
  constructor(client, file, dir = "/") {
1838
1841
  this.client = client;
1839
- this.dir = dir;
1842
+ this.dir = dir || "/";
1840
1843
  this.createdAt = new Date(file.created_at);
1841
1844
  this.isFile = file.is_file;
1842
1845
  this.isSymlink = file.is_symlink;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pelican.ts/sdk",
3
- "version": "0.4.16-next.1",
3
+ "version": "0.4.16-next.3",
4
4
  "description": "Pelican panel SDK for TypeScript",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",