@objectstack/service-storage 6.7.0 → 6.8.0
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/LICENSE +93 -202
- package/dist/index.cjs +14 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -4
- package/dist/index.d.ts +12 -4
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.cts
CHANGED
|
@@ -479,7 +479,7 @@ declare const SystemFile: Omit<{
|
|
|
479
479
|
abstract: boolean;
|
|
480
480
|
datasource: string;
|
|
481
481
|
fields: Record<string, {
|
|
482
|
-
type: "number" | "boolean" | "date" | "file" | "signature" | "tags" | "code" | "datetime" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "vector";
|
|
482
|
+
type: "number" | "boolean" | "date" | "file" | "signature" | "tags" | "code" | "datetime" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "vector";
|
|
483
483
|
required: boolean;
|
|
484
484
|
searchable: boolean;
|
|
485
485
|
multiple: boolean;
|
|
@@ -842,6 +842,10 @@ declare const SystemFile: Omit<{
|
|
|
842
842
|
} | {
|
|
843
843
|
provider: "value";
|
|
844
844
|
items: unknown[];
|
|
845
|
+
} | {
|
|
846
|
+
provider: "schema";
|
|
847
|
+
schemaId: string;
|
|
848
|
+
schema?: Record<string, unknown> | undefined;
|
|
845
849
|
} | undefined;
|
|
846
850
|
filter?: {
|
|
847
851
|
field: string;
|
|
@@ -1089,7 +1093,7 @@ declare const SystemFile: Omit<{
|
|
|
1089
1093
|
field?: string | undefined;
|
|
1090
1094
|
objectOverride?: string | undefined;
|
|
1091
1095
|
label?: string | undefined;
|
|
1092
|
-
type?: "number" | "boolean" | "date" | "file" | "code" | "datetime" | "signature" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "tags" | "vector" | undefined;
|
|
1096
|
+
type?: "number" | "boolean" | "date" | "file" | "code" | "datetime" | "signature" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "tags" | "vector" | undefined;
|
|
1093
1097
|
options?: {
|
|
1094
1098
|
label: string;
|
|
1095
1099
|
value: string;
|
|
@@ -3616,7 +3620,7 @@ declare const SystemUploadSession: Omit<{
|
|
|
3616
3620
|
abstract: boolean;
|
|
3617
3621
|
datasource: string;
|
|
3618
3622
|
fields: Record<string, {
|
|
3619
|
-
type: "number" | "boolean" | "date" | "file" | "signature" | "tags" | "code" | "datetime" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "vector";
|
|
3623
|
+
type: "number" | "boolean" | "date" | "file" | "signature" | "tags" | "code" | "datetime" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "vector";
|
|
3620
3624
|
required: boolean;
|
|
3621
3625
|
searchable: boolean;
|
|
3622
3626
|
multiple: boolean;
|
|
@@ -3979,6 +3983,10 @@ declare const SystemUploadSession: Omit<{
|
|
|
3979
3983
|
} | {
|
|
3980
3984
|
provider: "value";
|
|
3981
3985
|
items: unknown[];
|
|
3986
|
+
} | {
|
|
3987
|
+
provider: "schema";
|
|
3988
|
+
schemaId: string;
|
|
3989
|
+
schema?: Record<string, unknown> | undefined;
|
|
3982
3990
|
} | undefined;
|
|
3983
3991
|
filter?: {
|
|
3984
3992
|
field: string;
|
|
@@ -4226,7 +4234,7 @@ declare const SystemUploadSession: Omit<{
|
|
|
4226
4234
|
field?: string | undefined;
|
|
4227
4235
|
objectOverride?: string | undefined;
|
|
4228
4236
|
label?: string | undefined;
|
|
4229
|
-
type?: "number" | "boolean" | "date" | "file" | "code" | "datetime" | "signature" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "tags" | "vector" | undefined;
|
|
4237
|
+
type?: "number" | "boolean" | "date" | "file" | "code" | "datetime" | "signature" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "tags" | "vector" | undefined;
|
|
4230
4238
|
options?: {
|
|
4231
4239
|
label: string;
|
|
4232
4240
|
value: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -479,7 +479,7 @@ declare const SystemFile: Omit<{
|
|
|
479
479
|
abstract: boolean;
|
|
480
480
|
datasource: string;
|
|
481
481
|
fields: Record<string, {
|
|
482
|
-
type: "number" | "boolean" | "date" | "file" | "signature" | "tags" | "code" | "datetime" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "vector";
|
|
482
|
+
type: "number" | "boolean" | "date" | "file" | "signature" | "tags" | "code" | "datetime" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "vector";
|
|
483
483
|
required: boolean;
|
|
484
484
|
searchable: boolean;
|
|
485
485
|
multiple: boolean;
|
|
@@ -842,6 +842,10 @@ declare const SystemFile: Omit<{
|
|
|
842
842
|
} | {
|
|
843
843
|
provider: "value";
|
|
844
844
|
items: unknown[];
|
|
845
|
+
} | {
|
|
846
|
+
provider: "schema";
|
|
847
|
+
schemaId: string;
|
|
848
|
+
schema?: Record<string, unknown> | undefined;
|
|
845
849
|
} | undefined;
|
|
846
850
|
filter?: {
|
|
847
851
|
field: string;
|
|
@@ -1089,7 +1093,7 @@ declare const SystemFile: Omit<{
|
|
|
1089
1093
|
field?: string | undefined;
|
|
1090
1094
|
objectOverride?: string | undefined;
|
|
1091
1095
|
label?: string | undefined;
|
|
1092
|
-
type?: "number" | "boolean" | "date" | "file" | "code" | "datetime" | "signature" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "tags" | "vector" | undefined;
|
|
1096
|
+
type?: "number" | "boolean" | "date" | "file" | "code" | "datetime" | "signature" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "tags" | "vector" | undefined;
|
|
1093
1097
|
options?: {
|
|
1094
1098
|
label: string;
|
|
1095
1099
|
value: string;
|
|
@@ -3616,7 +3620,7 @@ declare const SystemUploadSession: Omit<{
|
|
|
3616
3620
|
abstract: boolean;
|
|
3617
3621
|
datasource: string;
|
|
3618
3622
|
fields: Record<string, {
|
|
3619
|
-
type: "number" | "boolean" | "date" | "file" | "signature" | "tags" | "code" | "datetime" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "vector";
|
|
3623
|
+
type: "number" | "boolean" | "date" | "file" | "signature" | "tags" | "code" | "datetime" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "vector";
|
|
3620
3624
|
required: boolean;
|
|
3621
3625
|
searchable: boolean;
|
|
3622
3626
|
multiple: boolean;
|
|
@@ -3979,6 +3983,10 @@ declare const SystemUploadSession: Omit<{
|
|
|
3979
3983
|
} | {
|
|
3980
3984
|
provider: "value";
|
|
3981
3985
|
items: unknown[];
|
|
3986
|
+
} | {
|
|
3987
|
+
provider: "schema";
|
|
3988
|
+
schemaId: string;
|
|
3989
|
+
schema?: Record<string, unknown> | undefined;
|
|
3982
3990
|
} | undefined;
|
|
3983
3991
|
filter?: {
|
|
3984
3992
|
field: string;
|
|
@@ -4226,7 +4234,7 @@ declare const SystemUploadSession: Omit<{
|
|
|
4226
4234
|
field?: string | undefined;
|
|
4227
4235
|
objectOverride?: string | undefined;
|
|
4228
4236
|
label?: string | undefined;
|
|
4229
|
-
type?: "number" | "boolean" | "date" | "file" | "code" | "datetime" | "signature" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "tags" | "vector" | undefined;
|
|
4237
|
+
type?: "number" | "boolean" | "date" | "file" | "code" | "datetime" | "signature" | "progress" | "url" | "text" | "textarea" | "email" | "phone" | "password" | "markdown" | "html" | "richtext" | "currency" | "percent" | "time" | "toggle" | "select" | "multiselect" | "radio" | "checkboxes" | "lookup" | "master_detail" | "tree" | "image" | "avatar" | "video" | "audio" | "formula" | "summary" | "autonumber" | "composite" | "repeater" | "location" | "address" | "json" | "color" | "rating" | "slider" | "qrcode" | "tags" | "vector" | undefined;
|
|
4230
4238
|
options?: {
|
|
4231
4239
|
label: string;
|
|
4232
4240
|
value: string;
|
package/dist/index.js
CHANGED
|
@@ -1452,14 +1452,16 @@ var StorageServicePlugin = class {
|
|
|
1452
1452
|
}
|
|
1453
1453
|
if (typeof settings.registerAction === "function" && this.storage) {
|
|
1454
1454
|
const proxy = this.storage;
|
|
1455
|
-
settings.registerAction("storage", "test", async ({ values }) => {
|
|
1455
|
+
settings.registerAction("storage", "test", async ({ values, payload }) => {
|
|
1456
|
+
const overrides = extractOverrides(payload);
|
|
1457
|
+
const merged = { ...values ?? {}, ...overrides };
|
|
1456
1458
|
const probeKey = `__objectstack_probe__/${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
|
|
1457
1459
|
const probeBytes = Buffer.from(`probe@${(/* @__PURE__ */ new Date()).toISOString()}`, "utf-8");
|
|
1458
1460
|
try {
|
|
1459
1461
|
let target = proxy;
|
|
1460
|
-
if (
|
|
1462
|
+
if (merged && Object.keys(merged).length > 0) {
|
|
1461
1463
|
try {
|
|
1462
|
-
target = await this.buildAdapterFromValues(
|
|
1464
|
+
target = await this.buildAdapterFromValues(merged);
|
|
1463
1465
|
} catch (err) {
|
|
1464
1466
|
return { ok: false, severity: "error", message: err?.message ?? String(err) };
|
|
1465
1467
|
}
|
|
@@ -1470,7 +1472,7 @@ var StorageServicePlugin = class {
|
|
|
1470
1472
|
return { ok: false, severity: "error", message: "Probe download did not match upload." };
|
|
1471
1473
|
}
|
|
1472
1474
|
await target.delete(probeKey);
|
|
1473
|
-
const adapter = String(
|
|
1475
|
+
const adapter = String(merged.adapter ?? this.options.adapter ?? "local");
|
|
1474
1476
|
return {
|
|
1475
1477
|
ok: true,
|
|
1476
1478
|
severity: "info",
|
|
@@ -1500,6 +1502,14 @@ function resolveMetrics(ctx, override) {
|
|
|
1500
1502
|
}
|
|
1501
1503
|
return new NoopMetricsRegistry3();
|
|
1502
1504
|
}
|
|
1505
|
+
function extractOverrides(payload) {
|
|
1506
|
+
if (!payload || typeof payload !== "object") return {};
|
|
1507
|
+
const p = payload;
|
|
1508
|
+
if (p.values && typeof p.values === "object" && p.values !== null) {
|
|
1509
|
+
return p.values;
|
|
1510
|
+
}
|
|
1511
|
+
return p;
|
|
1512
|
+
}
|
|
1503
1513
|
|
|
1504
1514
|
// src/index.ts
|
|
1505
1515
|
init_s3_storage_adapter();
|