@executioncontrolprotocol/azure-blob-storage 0.13.2 → 0.60.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 +198 -13
- package/README.md +3 -52
- package/dist/azure-client.d.ts +102 -0
- package/dist/azure-client.d.ts.map +1 -0
- package/dist/azure-client.js +133 -0
- package/dist/azure-client.js.map +1 -0
- package/dist/blob-name.d.ts +9 -0
- package/dist/blob-name.d.ts.map +1 -0
- package/dist/blob-name.js +41 -0
- package/dist/blob-name.js.map +1 -0
- package/dist/capabilities/delete.d.ts +8 -0
- package/dist/capabilities/delete.d.ts.map +1 -0
- package/dist/capabilities/delete.js +19 -0
- package/dist/capabilities/delete.js.map +1 -0
- package/dist/capabilities/download.d.ts +5 -6
- package/dist/capabilities/download.d.ts.map +1 -1
- package/dist/capabilities/download.js +15 -31
- package/dist/capabilities/download.js.map +1 -1
- package/dist/capabilities/sas.d.ts +8 -0
- package/dist/capabilities/sas.d.ts.map +1 -0
- package/dist/capabilities/sas.js +22 -0
- package/dist/capabilities/sas.js.map +1 -0
- package/dist/capabilities/upload.d.ts +5 -24
- package/dist/capabilities/upload.d.ts.map +1 -1
- package/dist/capabilities/upload.js +35 -100
- package/dist/capabilities/upload.js.map +1 -1
- package/dist/config.d.ts +17 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +31 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +208 -24
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +85 -36
- package/dist/index.js.map +1 -1
- package/dist/schemas.d.ts +204 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +116 -0
- package/dist/schemas.js.map +1 -0
- package/ecp.manifest.json +87 -0
- package/ecp.schema.json +446 -0
- package/package.json +27 -15
- package/dist/capabilities/create-sas-url-schema.d.ts +0 -33
- package/dist/capabilities/create-sas-url-schema.d.ts.map +0 -1
- package/dist/capabilities/create-sas-url-schema.js +0 -16
- package/dist/capabilities/create-sas-url-schema.js.map +0 -1
- package/dist/capabilities/create-sas-url.d.ts +0 -9
- package/dist/capabilities/create-sas-url.d.ts.map +0 -1
- package/dist/capabilities/create-sas-url.js +0 -22
- package/dist/capabilities/create-sas-url.js.map +0 -1
- package/dist/capabilities/download-schema.d.ts +0 -28
- package/dist/capabilities/download-schema.d.ts.map +0 -1
- package/dist/capabilities/download-schema.js +0 -15
- package/dist/capabilities/download-schema.js.map +0 -1
- package/dist/capabilities/upload-mixed.d.ts +0 -8
- package/dist/capabilities/upload-mixed.d.ts.map +0 -1
- package/dist/capabilities/upload-mixed.js +0 -30
- package/dist/capabilities/upload-mixed.js.map +0 -1
- package/dist/capabilities/upload-schema.d.ts +0 -77
- package/dist/capabilities/upload-schema.d.ts.map +0 -1
- package/dist/capabilities/upload-schema.js +0 -33
- package/dist/capabilities/upload-schema.js.map +0 -1
- package/dist/capability-catalog.d.ts +0 -13
- package/dist/capability-catalog.d.ts.map +0 -1
- package/dist/capability-catalog.js +0 -65
- package/dist/capability-catalog.js.map +0 -1
- package/dist/client.d.ts +0 -54
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -67
- package/dist/client.js.map +0 -1
- package/dist/index.browser.d.ts +0 -20
- package/dist/index.browser.d.ts.map +0 -1
- package/dist/index.browser.js +0 -34
- package/dist/index.browser.js.map +0 -1
- package/dist/permissions.d.ts +0 -5
- package/dist/permissions.d.ts.map +0 -1
- package/dist/permissions.js +0 -3
- package/dist/permissions.js.map +0 -1
- package/dist/sas.d.ts +0 -30
- package/dist/sas.d.ts.map +0 -1
- package/dist/sas.js +0 -32
- package/dist/sas.js.map +0 -1
- package/dist/shared.d.ts +0 -11
- package/dist/shared.d.ts.map +0 -1
- package/dist/shared.js +0 -41
- package/dist/shared.js.map +0 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,8BAA8B,EAC9B,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,eAAe,EACf,WAAW,EACX,YAAY,EACZ,aAAa,EACb,cAAc,EACd,QAAQ,EACR,SAAS,EACT,WAAW,EACX,YAAY,GACb,MAAM,cAAc,CAAA;AAErB;;;GAGG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sEAgBjB,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;sEASnB,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;sEAYd,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;sEAiB3B,CAAA;AAEF;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBAYE"}
|
package/dist/index.js
CHANGED
|
@@ -1,41 +1,90 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { handleDownload } from "./capabilities/download.js";
|
|
5
|
-
import { buildAzureBlobCapabilities } from "./capability-catalog.js";
|
|
6
|
-
import { buildAzureBlobStorageExtension } from "./shared.js";
|
|
1
|
+
import { capability, definePlugin } from "@executioncontrolprotocol/plugin-sdk";
|
|
2
|
+
import { azureBlobConfigSchema, deleteAcceptsSchema, deleteReturnsSchema, downloadAcceptsSchema, downloadReturnsSchema, sasAcceptsSchema, sasReturnsSchema, uploadAcceptsSchema, uploadReturnsSchema, } from "./schemas.js";
|
|
3
|
+
export { artifactRefSchema, azureBlobConfigSchema, DEFAULT_SAS_EXPIRES_IN_SECONDS, DEFAULT_SAS_PERMISSIONS, deleteAcceptsSchema, deleteReturnsSchema, downloadAcceptsSchema, downloadReturnsSchema, fileRefSchema, sasAcceptsSchema, sasReturnsSchema, uploadAcceptsSchema, uploadReturnsSchema, } from "./schemas.js";
|
|
7
4
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* Bind credentials via `secrets("azure-blob-storage/connection-string")` or
|
|
11
|
-
* `accountName` + `accountKey`. Mint read SAS URLs for Adobe Firefly
|
|
12
|
-
* `referenceBlobs` / Photoshop `source.url`.
|
|
13
|
-
*
|
|
14
|
-
* Browser mixed `upload` hops `create-sas-url` then PUTs from the tab. Allow the
|
|
15
|
-
* demo origin on the container CORS policy (`PUT`, `x-ms-blob-type`).
|
|
16
|
-
*
|
|
17
|
-
* @category Extensions
|
|
5
|
+
* Upload capability definition.
|
|
6
|
+
* @category Plugins
|
|
18
7
|
*/
|
|
19
|
-
export const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
8
|
+
export const upload = capability({
|
|
9
|
+
summary: "Upload a file to Azure Blob Storage.",
|
|
10
|
+
description: "Reads a file ref (local path, URL or run artifact) and stores it as a block blob, overwriting any blob with the same name. Without `blobName` it picks a unique name, `ecp/<runId>/<stepId>/<name>-<8 hex>` plus the file extension; without `container` the config's defaultContainer is used. By default the returned `file` url is a one-hour read SAS (`createReadSas`, default true); set it to false for the bare blob URL on public containers. Use `sas` for other permissions or lifetimes.",
|
|
11
|
+
useCases: [
|
|
12
|
+
"Persist generated media or reports so later steps or people can fetch them",
|
|
13
|
+
"Hand a file to an external service that only accepts URLs (bind `file` into url-only inputs)",
|
|
14
|
+
],
|
|
15
|
+
projections: [
|
|
16
|
+
"Bind `file` (a url FileRef) into url-only capability inputs; keep `blobName` and `container` for delete or sas",
|
|
17
|
+
],
|
|
18
|
+
accepts: uploadAcceptsSchema,
|
|
19
|
+
returns: uploadReturnsSchema,
|
|
20
|
+
role: "publish",
|
|
21
|
+
publish: { fileField: "file", locatorFields: ["blobName", "container"] },
|
|
22
|
+
handler: () => import("./capabilities/upload.js"),
|
|
23
|
+
});
|
|
25
24
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* @category Extensions
|
|
25
|
+
* Download capability definition.
|
|
26
|
+
* @category Plugins
|
|
29
27
|
*/
|
|
30
|
-
export
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
export const download = capability({
|
|
29
|
+
summary: "Download a blob into a run artifact.",
|
|
30
|
+
description: "Fetches one blob into memory and writes it as a run artifact named after the last segment of the blob name, with the blob's Content-Type. Missing blobs fail the step with ECP_PROVIDER_ERROR and status 404.",
|
|
31
|
+
useCases: ["Bring a stored blob into the run so later steps can read it as a file ref"],
|
|
32
|
+
projections: ["Take `file` (an artifact ref) and pass it to the next step's file input"],
|
|
33
|
+
accepts: downloadAcceptsSchema,
|
|
34
|
+
returns: downloadReturnsSchema,
|
|
35
|
+
handler: () => import("./capabilities/download.js"),
|
|
36
|
+
});
|
|
37
|
+
/**
|
|
38
|
+
* SAS capability definition.
|
|
39
|
+
* @category Plugins
|
|
40
|
+
*/
|
|
41
|
+
export const sas = capability({
|
|
42
|
+
summary: "Mint a signed URL for one blob.",
|
|
43
|
+
description: "Creates a service SAS URL for an existing or future blob. Defaults to read-only for one hour; `permissions` takes the letters r, a, c, w and d. Needs an account key in the config (a connection string with AccountKey, or accountName and accountKey). The blob is not checked for existence.",
|
|
44
|
+
useCases: [
|
|
45
|
+
"Share a stored blob with a person or service for a limited time",
|
|
46
|
+
"Give an external service a write URL (`cw`) to upload a result directly",
|
|
47
|
+
],
|
|
48
|
+
projections: ["Bind `file` (a url FileRef) into url-only inputs; `expiresOn` says when the SAS stops working"],
|
|
49
|
+
accepts: sasAcceptsSchema,
|
|
50
|
+
returns: sasReturnsSchema,
|
|
51
|
+
handler: () => import("./capabilities/sas.js"),
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* Delete capability definition.
|
|
55
|
+
* @category Plugins
|
|
56
|
+
*/
|
|
57
|
+
export const deleteCapability = capability({
|
|
58
|
+
summary: "Delete one blob from Azure Blob Storage.",
|
|
59
|
+
description: "Removes a block blob by name. Without `container` the config's defaultContainer is used. Set `ifMissing` to `ignore` to treat a missing blob as success with `deleted: false`; the default `error` fails the step with ECP_PROVIDER_ERROR (HTTP 404 from Azure).",
|
|
60
|
+
useCases: [
|
|
61
|
+
"Remove temporary uploads after an external service has read them",
|
|
62
|
+
"Clean up staging blobs once downstream steps no longer need them",
|
|
63
|
+
],
|
|
64
|
+
projections: [
|
|
65
|
+
"Check `deleted` to see whether Azure removed the blob (`false` only when `ifMissing` is `ignore` and the blob was absent)",
|
|
66
|
+
"Reuse `blobName` and `container` to confirm which object was addressed",
|
|
67
|
+
],
|
|
68
|
+
accepts: deleteAcceptsSchema,
|
|
69
|
+
returns: deleteReturnsSchema,
|
|
70
|
+
role: "unpublish",
|
|
71
|
+
publish: { locatorFields: ["blobName", "container"] },
|
|
72
|
+
handler: () => import("./capabilities/delete.js"),
|
|
73
|
+
});
|
|
74
|
+
/**
|
|
75
|
+
* Azure Blob Storage plugin: upload, download, SAS URLs and delete.
|
|
76
|
+
* @category Plugins
|
|
77
|
+
*/
|
|
78
|
+
export default definePlugin({
|
|
79
|
+
id: "@executioncontrolprotocol/azure-blob-storage",
|
|
80
|
+
summary: "Upload, download, delete and mint SAS URLs for Azure Blob Storage.",
|
|
81
|
+
description: "Blob storage for executions that persist media, share time-limited links, bring stored objects into a run as artifacts, or remove blobs after use. The config object holds either a connection string or an account name and key (as secret references), plus an optional default container. Node hosts only.",
|
|
82
|
+
config: azureBlobConfigSchema,
|
|
83
|
+
capabilities: {
|
|
84
|
+
upload,
|
|
85
|
+
download,
|
|
86
|
+
sas,
|
|
87
|
+
delete: deleteCapability,
|
|
88
|
+
},
|
|
89
|
+
});
|
|
41
90
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAA;AAC/E,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,cAAc,CAAA;AAErB,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,8BAA8B,EAC9B,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,cAAc,CAAA;AAarB;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAC;IAC/B,OAAO,EAAE,sCAAsC;IAC/C,WAAW,EACT,seAAse;IACxe,QAAQ,EAAE;QACR,4EAA4E;QAC5E,8FAA8F;KAC/F;IACD,WAAW,EAAE;QACX,gHAAgH;KACjH;IACD,OAAO,EAAE,mBAAmB;IAC5B,OAAO,EAAE,mBAAmB;IAC5B,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC,EAAE;IACxE,OAAO,EAAE,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,EAAE,EAAE,8CAA8C;IAClD,OAAO,EAAE,oEAAoE;IAC7E,WAAW,EACT,+SAA+S;IACjT,MAAM,EAAE,qBAAqB;IAC7B,YAAY,EAAE;QACZ,MAAM;QACN,QAAQ;QACR,GAAG;QACH,MAAM,EAAE,gBAAgB;KACzB;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { fileRefSchema } from "@executioncontrolprotocol/plugin-sdk";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
/**
|
|
4
|
+
* SAS lifetime when the input doesn't set `expiresInSeconds`.
|
|
5
|
+
* @category Plugins
|
|
6
|
+
*/
|
|
7
|
+
export declare const DEFAULT_SAS_EXPIRES_IN_SECONDS = 3600;
|
|
8
|
+
/**
|
|
9
|
+
* SAS permissions when the input doesn't set `permissions` (read only).
|
|
10
|
+
* @category Plugins
|
|
11
|
+
*/
|
|
12
|
+
export declare const DEFAULT_SAS_PERMISSIONS = "r";
|
|
13
|
+
/**
|
|
14
|
+
* Plugin config: a connection string, or an account name and key. Either may name a default container.
|
|
15
|
+
* @category Plugins
|
|
16
|
+
*/
|
|
17
|
+
export declare const azureBlobConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
18
|
+
connectionString: z.ZodString;
|
|
19
|
+
defaultContainer: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
+
accountName: z.ZodString;
|
|
22
|
+
accountKey: z.ZodString;
|
|
23
|
+
defaultContainer: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, z.core.$strip>]>;
|
|
25
|
+
/**
|
|
26
|
+
* Parsed plugin config.
|
|
27
|
+
* @category Plugins
|
|
28
|
+
*/
|
|
29
|
+
export type AzureBlobConfig = z.infer<typeof azureBlobConfigSchema>;
|
|
30
|
+
export { fileRefSchema };
|
|
31
|
+
/**
|
|
32
|
+
* Artifact reference returned by `download`.
|
|
33
|
+
* @category Plugins
|
|
34
|
+
*/
|
|
35
|
+
export declare const artifactRefSchema: z.ZodObject<{
|
|
36
|
+
kind: z.ZodLiteral<"artifact">;
|
|
37
|
+
uri: z.ZodString;
|
|
38
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
39
|
+
name: z.ZodOptional<z.ZodString>;
|
|
40
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
export declare const uploadAcceptsSchema: z.ZodObject<{
|
|
43
|
+
file: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
44
|
+
kind: z.ZodLiteral<"file">;
|
|
45
|
+
path: z.ZodString;
|
|
46
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
47
|
+
archive: z.ZodOptional<z.ZodObject<{
|
|
48
|
+
kind: z.ZodLiteral<"artifact">;
|
|
49
|
+
uri: z.ZodString;
|
|
50
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
51
|
+
name: z.ZodOptional<z.ZodString>;
|
|
52
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
}, z.core.$strip>>;
|
|
54
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
55
|
+
kind: z.ZodLiteral<"url">;
|
|
56
|
+
url: z.ZodString;
|
|
57
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
58
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
59
|
+
archive: z.ZodOptional<z.ZodObject<{
|
|
60
|
+
kind: z.ZodLiteral<"artifact">;
|
|
61
|
+
uri: z.ZodString;
|
|
62
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
63
|
+
name: z.ZodOptional<z.ZodString>;
|
|
64
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
65
|
+
}, z.core.$strip>>;
|
|
66
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
67
|
+
kind: z.ZodLiteral<"artifact">;
|
|
68
|
+
uri: z.ZodString;
|
|
69
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
70
|
+
name: z.ZodOptional<z.ZodString>;
|
|
71
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
archive: z.ZodOptional<z.ZodObject<{
|
|
73
|
+
kind: z.ZodLiteral<"artifact">;
|
|
74
|
+
uri: z.ZodString;
|
|
75
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
76
|
+
name: z.ZodOptional<z.ZodString>;
|
|
77
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
}, z.core.$strip>>;
|
|
79
|
+
}, z.core.$strip>], "kind">;
|
|
80
|
+
blobName: z.ZodOptional<z.ZodString>;
|
|
81
|
+
container: z.ZodOptional<z.ZodString>;
|
|
82
|
+
createReadSas: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
83
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
/**
|
|
86
|
+
* Output of the `upload` capability.
|
|
87
|
+
* @category Plugins
|
|
88
|
+
*/
|
|
89
|
+
export declare const uploadReturnsSchema: z.ZodObject<{
|
|
90
|
+
blobName: z.ZodString;
|
|
91
|
+
container: z.ZodString;
|
|
92
|
+
file: z.ZodObject<{
|
|
93
|
+
kind: z.ZodLiteral<"url">;
|
|
94
|
+
url: z.ZodString;
|
|
95
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
96
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
}, z.core.$strip>;
|
|
99
|
+
/**
|
|
100
|
+
* Input of the `download` capability.
|
|
101
|
+
* @category Plugins
|
|
102
|
+
*/
|
|
103
|
+
export declare const downloadAcceptsSchema: z.ZodObject<{
|
|
104
|
+
blobName: z.ZodString;
|
|
105
|
+
container: z.ZodOptional<z.ZodString>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
/**
|
|
108
|
+
* Output of the `download` capability.
|
|
109
|
+
* @category Plugins
|
|
110
|
+
*/
|
|
111
|
+
export declare const downloadReturnsSchema: z.ZodObject<{
|
|
112
|
+
file: z.ZodObject<{
|
|
113
|
+
kind: z.ZodLiteral<"artifact">;
|
|
114
|
+
uri: z.ZodString;
|
|
115
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
116
|
+
name: z.ZodOptional<z.ZodString>;
|
|
117
|
+
sizeBytes: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
/**
|
|
121
|
+
* Input of the `sas` capability.
|
|
122
|
+
* @category Plugins
|
|
123
|
+
*/
|
|
124
|
+
export declare const sasAcceptsSchema: z.ZodObject<{
|
|
125
|
+
blobName: z.ZodString;
|
|
126
|
+
container: z.ZodOptional<z.ZodString>;
|
|
127
|
+
permissions: z.ZodOptional<z.ZodString>;
|
|
128
|
+
expiresInSeconds: z.ZodOptional<z.ZodNumber>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
/**
|
|
131
|
+
* Output of the `sas` capability.
|
|
132
|
+
* @category Plugins
|
|
133
|
+
*/
|
|
134
|
+
export declare const sasReturnsSchema: z.ZodObject<{
|
|
135
|
+
file: z.ZodObject<{
|
|
136
|
+
kind: z.ZodLiteral<"url">;
|
|
137
|
+
url: z.ZodString;
|
|
138
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
139
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
expiresOn: z.ZodString;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
/**
|
|
144
|
+
* Input of the `delete` capability.
|
|
145
|
+
* @category Plugins
|
|
146
|
+
*/
|
|
147
|
+
export declare const deleteAcceptsSchema: z.ZodObject<{
|
|
148
|
+
blobName: z.ZodString;
|
|
149
|
+
container: z.ZodOptional<z.ZodString>;
|
|
150
|
+
ifMissing: z.ZodDefault<z.ZodEnum<{
|
|
151
|
+
error: "error";
|
|
152
|
+
ignore: "ignore";
|
|
153
|
+
}>>;
|
|
154
|
+
}, z.core.$strip>;
|
|
155
|
+
/**
|
|
156
|
+
* Output of the `delete` capability.
|
|
157
|
+
* @category Plugins
|
|
158
|
+
*/
|
|
159
|
+
export declare const deleteReturnsSchema: z.ZodObject<{
|
|
160
|
+
blobName: z.ZodString;
|
|
161
|
+
container: z.ZodString;
|
|
162
|
+
deleted: z.ZodBoolean;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
/**
|
|
165
|
+
* Typed input of `upload`.
|
|
166
|
+
* @category Plugins
|
|
167
|
+
*/
|
|
168
|
+
export type UploadInput = z.infer<typeof uploadAcceptsSchema>;
|
|
169
|
+
/**
|
|
170
|
+
* Typed output of `upload`.
|
|
171
|
+
* @category Plugins
|
|
172
|
+
*/
|
|
173
|
+
export type UploadOutput = z.infer<typeof uploadReturnsSchema>;
|
|
174
|
+
/**
|
|
175
|
+
* Typed input of `download`.
|
|
176
|
+
* @category Plugins
|
|
177
|
+
*/
|
|
178
|
+
export type DownloadInput = z.infer<typeof downloadAcceptsSchema>;
|
|
179
|
+
/**
|
|
180
|
+
* Typed output of `download`.
|
|
181
|
+
* @category Plugins
|
|
182
|
+
*/
|
|
183
|
+
export type DownloadOutput = z.infer<typeof downloadReturnsSchema>;
|
|
184
|
+
/**
|
|
185
|
+
* Typed input of `sas`.
|
|
186
|
+
* @category Plugins
|
|
187
|
+
*/
|
|
188
|
+
export type SasInput = z.infer<typeof sasAcceptsSchema>;
|
|
189
|
+
/**
|
|
190
|
+
* Typed output of `sas`.
|
|
191
|
+
* @category Plugins
|
|
192
|
+
*/
|
|
193
|
+
export type SasOutput = z.infer<typeof sasReturnsSchema>;
|
|
194
|
+
/**
|
|
195
|
+
* Typed input of `delete`.
|
|
196
|
+
* @category Plugins
|
|
197
|
+
*/
|
|
198
|
+
export type DeleteInput = z.input<typeof deleteAcceptsSchema>;
|
|
199
|
+
/**
|
|
200
|
+
* Typed output of `delete`.
|
|
201
|
+
* @category Plugins
|
|
202
|
+
*/
|
|
203
|
+
export type DeleteOutput = z.infer<typeof deleteReturnsSchema>;
|
|
204
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAA;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;GAGG;AACH,eAAO,MAAM,8BAA8B,OAAO,CAAA;AAElD;;;GAGG;AACH,eAAO,MAAM,uBAAuB,MAAM,CAAA;AAI1C;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;mBAGhC,CAAA;AAEF;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE,OAAO,EAAE,aAAa,EAAE,CAAA;AAExB;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;iBAM5B,CAAA;AAgBF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM9B,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;iBAI9B,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;iBAGhC,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;iBAEhC,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;iBAQ3B,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;iBAG3B,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;iBAI9B,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;iBAI9B,CAAA;AAEF;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE7D;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE9D;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEjE;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAElE;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEvD;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAExD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE7D;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
|
package/dist/schemas.js
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { fileRefSchema } from "@executioncontrolprotocol/plugin-sdk";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
/**
|
|
4
|
+
* SAS lifetime when the input doesn't set `expiresInSeconds`.
|
|
5
|
+
* @category Plugins
|
|
6
|
+
*/
|
|
7
|
+
export const DEFAULT_SAS_EXPIRES_IN_SECONDS = 3600;
|
|
8
|
+
/**
|
|
9
|
+
* SAS permissions when the input doesn't set `permissions` (read only).
|
|
10
|
+
* @category Plugins
|
|
11
|
+
*/
|
|
12
|
+
export const DEFAULT_SAS_PERMISSIONS = "r";
|
|
13
|
+
const defaultContainer = z.string().min(1).optional();
|
|
14
|
+
/**
|
|
15
|
+
* Plugin config: a connection string, or an account name and key. Either may name a default container.
|
|
16
|
+
* @category Plugins
|
|
17
|
+
*/
|
|
18
|
+
export const azureBlobConfigSchema = z.union([
|
|
19
|
+
z.object({ connectionString: z.string().min(1), defaultContainer }),
|
|
20
|
+
z.object({ accountName: z.string().min(1), accountKey: z.string().min(1), defaultContainer }),
|
|
21
|
+
]);
|
|
22
|
+
export { fileRefSchema };
|
|
23
|
+
/**
|
|
24
|
+
* Artifact reference returned by `download`.
|
|
25
|
+
* @category Plugins
|
|
26
|
+
*/
|
|
27
|
+
export const artifactRefSchema = z.object({
|
|
28
|
+
kind: z.literal("artifact"),
|
|
29
|
+
uri: z.string(),
|
|
30
|
+
mediaType: z.string().optional(),
|
|
31
|
+
name: z.string().optional(),
|
|
32
|
+
sizeBytes: z.number().optional(),
|
|
33
|
+
});
|
|
34
|
+
const container = z.string().min(1).optional();
|
|
35
|
+
const blobName = z.string().min(1);
|
|
36
|
+
/**
|
|
37
|
+
* Input of the `upload` capability.
|
|
38
|
+
* @category Plugins
|
|
39
|
+
*/
|
|
40
|
+
const urlFileRefSchema = z.object({
|
|
41
|
+
kind: z.literal("url"),
|
|
42
|
+
url: z.string().url(),
|
|
43
|
+
headers: z.record(z.string(), z.string()).optional(),
|
|
44
|
+
mediaType: z.string().optional(),
|
|
45
|
+
});
|
|
46
|
+
export const uploadAcceptsSchema = z.object({
|
|
47
|
+
file: fileRefSchema(),
|
|
48
|
+
blobName: blobName.optional(),
|
|
49
|
+
container,
|
|
50
|
+
createReadSas: z.boolean().optional().default(true),
|
|
51
|
+
contentType: z.string().optional(),
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* Output of the `upload` capability.
|
|
55
|
+
* @category Plugins
|
|
56
|
+
*/
|
|
57
|
+
export const uploadReturnsSchema = z.object({
|
|
58
|
+
blobName: z.string(),
|
|
59
|
+
container: z.string(),
|
|
60
|
+
file: urlFileRefSchema,
|
|
61
|
+
});
|
|
62
|
+
/**
|
|
63
|
+
* Input of the `download` capability.
|
|
64
|
+
* @category Plugins
|
|
65
|
+
*/
|
|
66
|
+
export const downloadAcceptsSchema = z.object({
|
|
67
|
+
blobName,
|
|
68
|
+
container,
|
|
69
|
+
});
|
|
70
|
+
/**
|
|
71
|
+
* Output of the `download` capability.
|
|
72
|
+
* @category Plugins
|
|
73
|
+
*/
|
|
74
|
+
export const downloadReturnsSchema = z.object({
|
|
75
|
+
file: artifactRefSchema,
|
|
76
|
+
});
|
|
77
|
+
/**
|
|
78
|
+
* Input of the `sas` capability.
|
|
79
|
+
* @category Plugins
|
|
80
|
+
*/
|
|
81
|
+
export const sasAcceptsSchema = z.object({
|
|
82
|
+
blobName,
|
|
83
|
+
container,
|
|
84
|
+
permissions: z
|
|
85
|
+
.string()
|
|
86
|
+
.regex(/^[racwd]+$/, "Use permission letters r (read), a (add), c (create), w (write), d (delete).")
|
|
87
|
+
.optional(),
|
|
88
|
+
expiresInSeconds: z.number().int().positive().optional(),
|
|
89
|
+
});
|
|
90
|
+
/**
|
|
91
|
+
* Output of the `sas` capability.
|
|
92
|
+
* @category Plugins
|
|
93
|
+
*/
|
|
94
|
+
export const sasReturnsSchema = z.object({
|
|
95
|
+
file: urlFileRefSchema,
|
|
96
|
+
expiresOn: z.string(),
|
|
97
|
+
});
|
|
98
|
+
/**
|
|
99
|
+
* Input of the `delete` capability.
|
|
100
|
+
* @category Plugins
|
|
101
|
+
*/
|
|
102
|
+
export const deleteAcceptsSchema = z.object({
|
|
103
|
+
blobName,
|
|
104
|
+
container,
|
|
105
|
+
ifMissing: z.enum(["error", "ignore"]).default("error"),
|
|
106
|
+
});
|
|
107
|
+
/**
|
|
108
|
+
* Output of the `delete` capability.
|
|
109
|
+
* @category Plugins
|
|
110
|
+
*/
|
|
111
|
+
export const deleteReturnsSchema = z.object({
|
|
112
|
+
blobName: z.string(),
|
|
113
|
+
container: z.string(),
|
|
114
|
+
deleted: z.boolean(),
|
|
115
|
+
});
|
|
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er is used. Set `ifMissing` to `ignore` to treat a missing blob as success with `deleted: false`; the default `error` fails the step with ECP_PROVIDER_ERROR (HTTP 404 from Azure).",
|
|
5
|
+
"id": "@executioncontrolprotocol/azure-blob-storage.delete",
|
|
6
|
+
"name": "delete",
|
|
7
|
+
"projections": [
|
|
8
|
+
"Check `deleted` to see whether Azure removed the blob (`false` only when `ifMissing` is `ignore` and the blob was absent)",
|
|
9
|
+
"Reuse `blobName` and `container` to confirm which object was addressed"
|
|
10
|
+
],
|
|
11
|
+
"publish": {
|
|
12
|
+
"locatorFields": [
|
|
13
|
+
"blobName",
|
|
14
|
+
"container"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"role": "unpublish",
|
|
18
|
+
"summary": "Delete one blob from Azure Blob Storage.",
|
|
19
|
+
"useCases": [
|
|
20
|
+
"Remove temporary uploads after an external service has read them",
|
|
21
|
+
"Clean up staging blobs once downstream steps no longer need them"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"description": "Fetches one blob into memory and writes it as a run artifact named after the last segment of the blob name, with the blob's Content-Type. Missing blobs fail the step with ECP_PROVIDER_ERROR and status 404.",
|
|
26
|
+
"id": "@executioncontrolprotocol/azure-blob-storage.download",
|
|
27
|
+
"name": "download",
|
|
28
|
+
"projections": [
|
|
29
|
+
"Take `file` (an artifact ref) and pass it to the next step's file input"
|
|
30
|
+
],
|
|
31
|
+
"summary": "Download a blob into a run artifact.",
|
|
32
|
+
"useCases": [
|
|
33
|
+
"Bring a stored blob into the run so later steps can read it as a file ref"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"description": "Creates a service SAS URL for an existing or future blob. Defaults to read-only for one hour; `permissions` takes the letters r, a, c, w and d. Needs an account key in the config (a connection string with AccountKey, or accountName and accountKey). The blob is not checked for existence.",
|
|
38
|
+
"id": "@executioncontrolprotocol/azure-blob-storage.sas",
|
|
39
|
+
"name": "sas",
|
|
40
|
+
"projections": [
|
|
41
|
+
"Bind `file` (a url FileRef) into url-only inputs; `expiresOn` says when the SAS stops working"
|
|
42
|
+
],
|
|
43
|
+
"summary": "Mint a signed URL for one blob.",
|
|
44
|
+
"useCases": [
|
|
45
|
+
"Share a stored blob with a person or service for a limited time",
|
|
46
|
+
"Give an external service a write URL (`cw`) to upload a result directly"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"description": "Reads a file ref (local path, URL or run artifact) and stores it as a block blob, overwriting any blob with the same name. Without `blobName` it picks a unique name, `ecp/<runId>/<stepId>/<name>-<8 hex>` plus the file extension; without `container` the config's defaultContainer is used. By default the returned `file` url is a one-hour read SAS (`createReadSas`, default true); set it to false for the bare blob URL on public containers. Use `sas` for other permissions or lifetimes.",
|
|
51
|
+
"id": "@executioncontrolprotocol/azure-blob-storage.upload",
|
|
52
|
+
"name": "upload",
|
|
53
|
+
"projections": [
|
|
54
|
+
"Bind `file` (a url FileRef) into url-only capability inputs; keep `blobName` and `container` for delete or sas"
|
|
55
|
+
],
|
|
56
|
+
"publish": {
|
|
57
|
+
"fileField": "file",
|
|
58
|
+
"locatorFields": [
|
|
59
|
+
"blobName",
|
|
60
|
+
"container"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"role": "publish",
|
|
64
|
+
"summary": "Upload a file to Azure Blob Storage.",
|
|
65
|
+
"useCases": [
|
|
66
|
+
"Persist generated media or reports so later steps or people can fetch them",
|
|
67
|
+
"Hand a file to an external service that only accepts URLs (bind `file` into url-only inputs)"
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"entry": "./dist/index.js",
|
|
72
|
+
"hash": "58a64441995ae131c1683ac39bd12330629607e7ed364ab2a02bedd1aa04fe74",
|
|
73
|
+
"plugin": {
|
|
74
|
+
"description": "Blob storage for executions that persist media, share time-limited links, bring stored objects into a run as artifacts, or remove blobs after use. The config object holds either a connection string or an account name and key (as secret references), plus an optional default container. Node hosts only.",
|
|
75
|
+
"id": "@executioncontrolprotocol/azure-blob-storage",
|
|
76
|
+
"package": "@executioncontrolprotocol/azure-blob-storage",
|
|
77
|
+
"summary": "Upload, download, delete and mint SAS URLs for Azure Blob Storage.",
|
|
78
|
+
"version": "0.60.0"
|
|
79
|
+
},
|
|
80
|
+
"pluginSchema": {
|
|
81
|
+
"hash": "e60d16854ac4c7484cc1984cb51df948b2fe876f7d15b08d02147351db874ef3",
|
|
82
|
+
"path": "./ecp.schema.json"
|
|
83
|
+
},
|
|
84
|
+
"schema": "@executioncontrolprotocol.plugin-manifest",
|
|
85
|
+
"sdkVersion": "0.60.0",
|
|
86
|
+
"version": "2.0"
|
|
87
|
+
}
|