@zapier/zapier-sdk 0.82.0 → 0.82.1
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/CHANGELOG.md +6 -0
- package/dist/experimental.cjs +85 -20
- package/dist/experimental.mjs +85 -20
- package/dist/index.cjs +85 -20
- package/dist/index.mjs +85 -20
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.82.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ce612ee: `.zapierrc` manifest parsing now validates each entry independently, so a single malformed entry no longer discards the entire manifest. Previously one invalid `apps` entry caused the whole manifest, including a valid `connections` map, to be dropped, which could surface as a misleading "connection not found" error. Invalid entries are now dropped individually with a warning identifying the section and key.
|
|
8
|
+
|
|
3
9
|
## 0.82.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/experimental.cjs
CHANGED
|
@@ -5219,7 +5219,7 @@ function parseDeprecationDate(value) {
|
|
|
5219
5219
|
}
|
|
5220
5220
|
|
|
5221
5221
|
// src/sdk-version.ts
|
|
5222
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.82.
|
|
5222
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.82.1" : void 0) || "unknown";
|
|
5223
5223
|
|
|
5224
5224
|
// src/utils/open-url.ts
|
|
5225
5225
|
var nodePrefix = "node:";
|
|
@@ -12544,6 +12544,10 @@ var ConnectionsMapSchema = zod.z.record(zod.z.string(), ConnectionEntrySchema);
|
|
|
12544
12544
|
|
|
12545
12545
|
// src/plugins/manifest/schemas.ts
|
|
12546
12546
|
var DEFAULT_CONFIG_PATH = ".zapierrc";
|
|
12547
|
+
var ManifestEntrySchema = zod.z.object({
|
|
12548
|
+
implementationName: zod.z.string().describe("Base implementation name without version (e.g., 'SlackCLIAPI')"),
|
|
12549
|
+
version: zod.z.string().describe("Version string (e.g., '1.21.1')")
|
|
12550
|
+
});
|
|
12547
12551
|
var ActionEntrySchema = zod.z.object({
|
|
12548
12552
|
appKey: zod.z.string().describe("App key (slug or implementation name)"),
|
|
12549
12553
|
actionKey: zod.z.string().describe("Action key identifier"),
|
|
@@ -12558,15 +12562,7 @@ var ActionEntrySchema = zod.z.object({
|
|
|
12558
12562
|
createdAt: zod.z.string().describe("ISO 8601 timestamp when created")
|
|
12559
12563
|
});
|
|
12560
12564
|
var ManifestSchema = zod.z.object({
|
|
12561
|
-
apps: zod.z.record(
|
|
12562
|
-
zod.z.string(),
|
|
12563
|
-
zod.z.object({
|
|
12564
|
-
implementationName: zod.z.string().describe(
|
|
12565
|
-
"Base implementation name without version (e.g., 'SlackCLIAPI')"
|
|
12566
|
-
),
|
|
12567
|
-
version: zod.z.string().describe("Version string (e.g., '1.21.1')")
|
|
12568
|
-
})
|
|
12569
|
-
).optional(),
|
|
12565
|
+
apps: zod.z.record(zod.z.string(), ManifestEntrySchema).optional(),
|
|
12570
12566
|
actions: zod.z.record(zod.z.string(), ActionEntrySchema).optional().describe("Saved action configurations with their schemas"),
|
|
12571
12567
|
canIncludeSharedConnections: zod.z.boolean().optional().describe("Allow listing shared connections"),
|
|
12572
12568
|
canIncludeSharedTables: zod.z.boolean().optional().describe("Allow listing shared tables"),
|
|
@@ -12592,22 +12588,91 @@ async function toArrayFromAsync(asyncIterable) {
|
|
|
12592
12588
|
}
|
|
12593
12589
|
|
|
12594
12590
|
// src/plugins/manifest/index.ts
|
|
12595
|
-
function
|
|
12596
|
-
|
|
12597
|
-
|
|
12598
|
-
|
|
12599
|
-
|
|
12600
|
-
|
|
12601
|
-
|
|
12591
|
+
function parseManifestSection({
|
|
12592
|
+
section,
|
|
12593
|
+
raw,
|
|
12594
|
+
schema,
|
|
12595
|
+
source
|
|
12596
|
+
}) {
|
|
12597
|
+
if (raw == null) {
|
|
12598
|
+
return void 0;
|
|
12599
|
+
}
|
|
12600
|
+
if (typeof raw !== "object" || Array.isArray(raw)) {
|
|
12601
|
+
console.warn(`\u26A0\uFE0F Ignoring "${section}" in ${source}: expected an object`);
|
|
12602
|
+
return void 0;
|
|
12603
|
+
}
|
|
12604
|
+
const kept = {};
|
|
12605
|
+
for (const [key2, value] of Object.entries(raw)) {
|
|
12606
|
+
const result = schema.safeParse(value);
|
|
12602
12607
|
if (result.success) {
|
|
12603
|
-
|
|
12608
|
+
kept[key2] = result.data;
|
|
12609
|
+
} else {
|
|
12610
|
+
console.warn(
|
|
12611
|
+
`\u26A0\uFE0F Dropping invalid "${section}" entry "${key2}" in ${source}: ${result.error}`
|
|
12612
|
+
);
|
|
12604
12613
|
}
|
|
12605
|
-
|
|
12606
|
-
|
|
12614
|
+
}
|
|
12615
|
+
return kept;
|
|
12616
|
+
}
|
|
12617
|
+
var MANIFEST_FLAGS = [
|
|
12618
|
+
"canIncludeSharedConnections",
|
|
12619
|
+
"canIncludeSharedTables",
|
|
12620
|
+
"canDeleteTables"
|
|
12621
|
+
];
|
|
12622
|
+
function parseManifestContent(content, source) {
|
|
12623
|
+
let parsed;
|
|
12624
|
+
try {
|
|
12625
|
+
parsed = JSON.parse(content);
|
|
12607
12626
|
} catch (error) {
|
|
12608
12627
|
console.warn(`\u26A0\uFE0F Failed to parse manifest from ${source}:`, error);
|
|
12609
12628
|
return null;
|
|
12610
12629
|
}
|
|
12630
|
+
if (parsed == null || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
12631
|
+
return null;
|
|
12632
|
+
}
|
|
12633
|
+
const raw = parsed;
|
|
12634
|
+
const manifest = {};
|
|
12635
|
+
const apps = parseManifestSection({
|
|
12636
|
+
section: "apps",
|
|
12637
|
+
raw: raw.apps,
|
|
12638
|
+
schema: ManifestEntrySchema,
|
|
12639
|
+
source
|
|
12640
|
+
});
|
|
12641
|
+
if (apps) {
|
|
12642
|
+
manifest.apps = apps;
|
|
12643
|
+
}
|
|
12644
|
+
const actions = parseManifestSection({
|
|
12645
|
+
section: "actions",
|
|
12646
|
+
raw: raw.actions,
|
|
12647
|
+
schema: ActionEntrySchema,
|
|
12648
|
+
source
|
|
12649
|
+
});
|
|
12650
|
+
if (actions) {
|
|
12651
|
+
manifest.actions = actions;
|
|
12652
|
+
}
|
|
12653
|
+
const connections = parseManifestSection({
|
|
12654
|
+
section: "connections",
|
|
12655
|
+
raw: raw.connections,
|
|
12656
|
+
schema: ConnectionEntrySchema,
|
|
12657
|
+
source
|
|
12658
|
+
});
|
|
12659
|
+
if (connections) {
|
|
12660
|
+
manifest.connections = connections;
|
|
12661
|
+
}
|
|
12662
|
+
for (const flag of MANIFEST_FLAGS) {
|
|
12663
|
+
const value = raw[flag];
|
|
12664
|
+
if (value === void 0) {
|
|
12665
|
+
continue;
|
|
12666
|
+
}
|
|
12667
|
+
if (typeof value === "boolean") {
|
|
12668
|
+
manifest[flag] = value;
|
|
12669
|
+
} else {
|
|
12670
|
+
console.warn(
|
|
12671
|
+
`\u26A0\uFE0F Dropping invalid "${flag}" in ${source}: expected a boolean`
|
|
12672
|
+
);
|
|
12673
|
+
}
|
|
12674
|
+
}
|
|
12675
|
+
return manifest;
|
|
12611
12676
|
}
|
|
12612
12677
|
async function readManifestFromFile(filePath) {
|
|
12613
12678
|
try {
|
package/dist/experimental.mjs
CHANGED
|
@@ -5217,7 +5217,7 @@ function parseDeprecationDate(value) {
|
|
|
5217
5217
|
}
|
|
5218
5218
|
|
|
5219
5219
|
// src/sdk-version.ts
|
|
5220
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.82.
|
|
5220
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.82.1" : void 0) || "unknown";
|
|
5221
5221
|
|
|
5222
5222
|
// src/utils/open-url.ts
|
|
5223
5223
|
var nodePrefix = "node:";
|
|
@@ -12542,6 +12542,10 @@ var ConnectionsMapSchema = z.record(z.string(), ConnectionEntrySchema);
|
|
|
12542
12542
|
|
|
12543
12543
|
// src/plugins/manifest/schemas.ts
|
|
12544
12544
|
var DEFAULT_CONFIG_PATH = ".zapierrc";
|
|
12545
|
+
var ManifestEntrySchema = z.object({
|
|
12546
|
+
implementationName: z.string().describe("Base implementation name without version (e.g., 'SlackCLIAPI')"),
|
|
12547
|
+
version: z.string().describe("Version string (e.g., '1.21.1')")
|
|
12548
|
+
});
|
|
12545
12549
|
var ActionEntrySchema = z.object({
|
|
12546
12550
|
appKey: z.string().describe("App key (slug or implementation name)"),
|
|
12547
12551
|
actionKey: z.string().describe("Action key identifier"),
|
|
@@ -12556,15 +12560,7 @@ var ActionEntrySchema = z.object({
|
|
|
12556
12560
|
createdAt: z.string().describe("ISO 8601 timestamp when created")
|
|
12557
12561
|
});
|
|
12558
12562
|
var ManifestSchema = z.object({
|
|
12559
|
-
apps: z.record(
|
|
12560
|
-
z.string(),
|
|
12561
|
-
z.object({
|
|
12562
|
-
implementationName: z.string().describe(
|
|
12563
|
-
"Base implementation name without version (e.g., 'SlackCLIAPI')"
|
|
12564
|
-
),
|
|
12565
|
-
version: z.string().describe("Version string (e.g., '1.21.1')")
|
|
12566
|
-
})
|
|
12567
|
-
).optional(),
|
|
12563
|
+
apps: z.record(z.string(), ManifestEntrySchema).optional(),
|
|
12568
12564
|
actions: z.record(z.string(), ActionEntrySchema).optional().describe("Saved action configurations with their schemas"),
|
|
12569
12565
|
canIncludeSharedConnections: z.boolean().optional().describe("Allow listing shared connections"),
|
|
12570
12566
|
canIncludeSharedTables: z.boolean().optional().describe("Allow listing shared tables"),
|
|
@@ -12590,22 +12586,91 @@ async function toArrayFromAsync(asyncIterable) {
|
|
|
12590
12586
|
}
|
|
12591
12587
|
|
|
12592
12588
|
// src/plugins/manifest/index.ts
|
|
12593
|
-
function
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
|
|
12597
|
-
|
|
12598
|
-
|
|
12599
|
-
|
|
12589
|
+
function parseManifestSection({
|
|
12590
|
+
section,
|
|
12591
|
+
raw,
|
|
12592
|
+
schema,
|
|
12593
|
+
source
|
|
12594
|
+
}) {
|
|
12595
|
+
if (raw == null) {
|
|
12596
|
+
return void 0;
|
|
12597
|
+
}
|
|
12598
|
+
if (typeof raw !== "object" || Array.isArray(raw)) {
|
|
12599
|
+
console.warn(`\u26A0\uFE0F Ignoring "${section}" in ${source}: expected an object`);
|
|
12600
|
+
return void 0;
|
|
12601
|
+
}
|
|
12602
|
+
const kept = {};
|
|
12603
|
+
for (const [key2, value] of Object.entries(raw)) {
|
|
12604
|
+
const result = schema.safeParse(value);
|
|
12600
12605
|
if (result.success) {
|
|
12601
|
-
|
|
12606
|
+
kept[key2] = result.data;
|
|
12607
|
+
} else {
|
|
12608
|
+
console.warn(
|
|
12609
|
+
`\u26A0\uFE0F Dropping invalid "${section}" entry "${key2}" in ${source}: ${result.error}`
|
|
12610
|
+
);
|
|
12602
12611
|
}
|
|
12603
|
-
|
|
12604
|
-
|
|
12612
|
+
}
|
|
12613
|
+
return kept;
|
|
12614
|
+
}
|
|
12615
|
+
var MANIFEST_FLAGS = [
|
|
12616
|
+
"canIncludeSharedConnections",
|
|
12617
|
+
"canIncludeSharedTables",
|
|
12618
|
+
"canDeleteTables"
|
|
12619
|
+
];
|
|
12620
|
+
function parseManifestContent(content, source) {
|
|
12621
|
+
let parsed;
|
|
12622
|
+
try {
|
|
12623
|
+
parsed = JSON.parse(content);
|
|
12605
12624
|
} catch (error) {
|
|
12606
12625
|
console.warn(`\u26A0\uFE0F Failed to parse manifest from ${source}:`, error);
|
|
12607
12626
|
return null;
|
|
12608
12627
|
}
|
|
12628
|
+
if (parsed == null || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
12629
|
+
return null;
|
|
12630
|
+
}
|
|
12631
|
+
const raw = parsed;
|
|
12632
|
+
const manifest = {};
|
|
12633
|
+
const apps = parseManifestSection({
|
|
12634
|
+
section: "apps",
|
|
12635
|
+
raw: raw.apps,
|
|
12636
|
+
schema: ManifestEntrySchema,
|
|
12637
|
+
source
|
|
12638
|
+
});
|
|
12639
|
+
if (apps) {
|
|
12640
|
+
manifest.apps = apps;
|
|
12641
|
+
}
|
|
12642
|
+
const actions = parseManifestSection({
|
|
12643
|
+
section: "actions",
|
|
12644
|
+
raw: raw.actions,
|
|
12645
|
+
schema: ActionEntrySchema,
|
|
12646
|
+
source
|
|
12647
|
+
});
|
|
12648
|
+
if (actions) {
|
|
12649
|
+
manifest.actions = actions;
|
|
12650
|
+
}
|
|
12651
|
+
const connections = parseManifestSection({
|
|
12652
|
+
section: "connections",
|
|
12653
|
+
raw: raw.connections,
|
|
12654
|
+
schema: ConnectionEntrySchema,
|
|
12655
|
+
source
|
|
12656
|
+
});
|
|
12657
|
+
if (connections) {
|
|
12658
|
+
manifest.connections = connections;
|
|
12659
|
+
}
|
|
12660
|
+
for (const flag of MANIFEST_FLAGS) {
|
|
12661
|
+
const value = raw[flag];
|
|
12662
|
+
if (value === void 0) {
|
|
12663
|
+
continue;
|
|
12664
|
+
}
|
|
12665
|
+
if (typeof value === "boolean") {
|
|
12666
|
+
manifest[flag] = value;
|
|
12667
|
+
} else {
|
|
12668
|
+
console.warn(
|
|
12669
|
+
`\u26A0\uFE0F Dropping invalid "${flag}" in ${source}: expected a boolean`
|
|
12670
|
+
);
|
|
12671
|
+
}
|
|
12672
|
+
}
|
|
12673
|
+
return manifest;
|
|
12609
12674
|
}
|
|
12610
12675
|
async function readManifestFromFile(filePath) {
|
|
12611
12676
|
try {
|
package/dist/index.cjs
CHANGED
|
@@ -6931,6 +6931,10 @@ var ConnectionsMapSchema = zod.z.record(zod.z.string(), ConnectionEntrySchema);
|
|
|
6931
6931
|
|
|
6932
6932
|
// src/plugins/manifest/schemas.ts
|
|
6933
6933
|
var DEFAULT_CONFIG_PATH = ".zapierrc";
|
|
6934
|
+
var ManifestEntrySchema = zod.z.object({
|
|
6935
|
+
implementationName: zod.z.string().describe("Base implementation name without version (e.g., 'SlackCLIAPI')"),
|
|
6936
|
+
version: zod.z.string().describe("Version string (e.g., '1.21.1')")
|
|
6937
|
+
});
|
|
6934
6938
|
var ActionEntrySchema = zod.z.object({
|
|
6935
6939
|
appKey: zod.z.string().describe("App key (slug or implementation name)"),
|
|
6936
6940
|
actionKey: zod.z.string().describe("Action key identifier"),
|
|
@@ -6945,15 +6949,7 @@ var ActionEntrySchema = zod.z.object({
|
|
|
6945
6949
|
createdAt: zod.z.string().describe("ISO 8601 timestamp when created")
|
|
6946
6950
|
});
|
|
6947
6951
|
var ManifestSchema = zod.z.object({
|
|
6948
|
-
apps: zod.z.record(
|
|
6949
|
-
zod.z.string(),
|
|
6950
|
-
zod.z.object({
|
|
6951
|
-
implementationName: zod.z.string().describe(
|
|
6952
|
-
"Base implementation name without version (e.g., 'SlackCLIAPI')"
|
|
6953
|
-
),
|
|
6954
|
-
version: zod.z.string().describe("Version string (e.g., '1.21.1')")
|
|
6955
|
-
})
|
|
6956
|
-
).optional(),
|
|
6952
|
+
apps: zod.z.record(zod.z.string(), ManifestEntrySchema).optional(),
|
|
6957
6953
|
actions: zod.z.record(zod.z.string(), ActionEntrySchema).optional().describe("Saved action configurations with their schemas"),
|
|
6958
6954
|
canIncludeSharedConnections: zod.z.boolean().optional().describe("Allow listing shared connections"),
|
|
6959
6955
|
canIncludeSharedTables: zod.z.boolean().optional().describe("Allow listing shared tables"),
|
|
@@ -6979,22 +6975,91 @@ async function toArrayFromAsync(asyncIterable) {
|
|
|
6979
6975
|
}
|
|
6980
6976
|
|
|
6981
6977
|
// src/plugins/manifest/index.ts
|
|
6982
|
-
function
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6978
|
+
function parseManifestSection({
|
|
6979
|
+
section,
|
|
6980
|
+
raw,
|
|
6981
|
+
schema,
|
|
6982
|
+
source
|
|
6983
|
+
}) {
|
|
6984
|
+
if (raw == null) {
|
|
6985
|
+
return void 0;
|
|
6986
|
+
}
|
|
6987
|
+
if (typeof raw !== "object" || Array.isArray(raw)) {
|
|
6988
|
+
console.warn(`\u26A0\uFE0F Ignoring "${section}" in ${source}: expected an object`);
|
|
6989
|
+
return void 0;
|
|
6990
|
+
}
|
|
6991
|
+
const kept = {};
|
|
6992
|
+
for (const [key2, value] of Object.entries(raw)) {
|
|
6993
|
+
const result = schema.safeParse(value);
|
|
6989
6994
|
if (result.success) {
|
|
6990
|
-
|
|
6995
|
+
kept[key2] = result.data;
|
|
6996
|
+
} else {
|
|
6997
|
+
console.warn(
|
|
6998
|
+
`\u26A0\uFE0F Dropping invalid "${section}" entry "${key2}" in ${source}: ${result.error}`
|
|
6999
|
+
);
|
|
6991
7000
|
}
|
|
6992
|
-
|
|
6993
|
-
|
|
7001
|
+
}
|
|
7002
|
+
return kept;
|
|
7003
|
+
}
|
|
7004
|
+
var MANIFEST_FLAGS = [
|
|
7005
|
+
"canIncludeSharedConnections",
|
|
7006
|
+
"canIncludeSharedTables",
|
|
7007
|
+
"canDeleteTables"
|
|
7008
|
+
];
|
|
7009
|
+
function parseManifestContent(content, source) {
|
|
7010
|
+
let parsed;
|
|
7011
|
+
try {
|
|
7012
|
+
parsed = JSON.parse(content);
|
|
6994
7013
|
} catch (error) {
|
|
6995
7014
|
console.warn(`\u26A0\uFE0F Failed to parse manifest from ${source}:`, error);
|
|
6996
7015
|
return null;
|
|
6997
7016
|
}
|
|
7017
|
+
if (parsed == null || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
7018
|
+
return null;
|
|
7019
|
+
}
|
|
7020
|
+
const raw = parsed;
|
|
7021
|
+
const manifest = {};
|
|
7022
|
+
const apps = parseManifestSection({
|
|
7023
|
+
section: "apps",
|
|
7024
|
+
raw: raw.apps,
|
|
7025
|
+
schema: ManifestEntrySchema,
|
|
7026
|
+
source
|
|
7027
|
+
});
|
|
7028
|
+
if (apps) {
|
|
7029
|
+
manifest.apps = apps;
|
|
7030
|
+
}
|
|
7031
|
+
const actions = parseManifestSection({
|
|
7032
|
+
section: "actions",
|
|
7033
|
+
raw: raw.actions,
|
|
7034
|
+
schema: ActionEntrySchema,
|
|
7035
|
+
source
|
|
7036
|
+
});
|
|
7037
|
+
if (actions) {
|
|
7038
|
+
manifest.actions = actions;
|
|
7039
|
+
}
|
|
7040
|
+
const connections = parseManifestSection({
|
|
7041
|
+
section: "connections",
|
|
7042
|
+
raw: raw.connections,
|
|
7043
|
+
schema: ConnectionEntrySchema,
|
|
7044
|
+
source
|
|
7045
|
+
});
|
|
7046
|
+
if (connections) {
|
|
7047
|
+
manifest.connections = connections;
|
|
7048
|
+
}
|
|
7049
|
+
for (const flag of MANIFEST_FLAGS) {
|
|
7050
|
+
const value = raw[flag];
|
|
7051
|
+
if (value === void 0) {
|
|
7052
|
+
continue;
|
|
7053
|
+
}
|
|
7054
|
+
if (typeof value === "boolean") {
|
|
7055
|
+
manifest[flag] = value;
|
|
7056
|
+
} else {
|
|
7057
|
+
console.warn(
|
|
7058
|
+
`\u26A0\uFE0F Dropping invalid "${flag}" in ${source}: expected a boolean`
|
|
7059
|
+
);
|
|
7060
|
+
}
|
|
7061
|
+
}
|
|
7062
|
+
return manifest;
|
|
6998
7063
|
}
|
|
6999
7064
|
async function readManifestFromFile(filePath) {
|
|
7000
7065
|
try {
|
|
@@ -8752,7 +8817,7 @@ function parseDeprecationDate(value) {
|
|
|
8752
8817
|
}
|
|
8753
8818
|
|
|
8754
8819
|
// src/sdk-version.ts
|
|
8755
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.82.
|
|
8820
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.82.1" : void 0) || "unknown";
|
|
8756
8821
|
|
|
8757
8822
|
// src/utils/open-url.ts
|
|
8758
8823
|
var nodePrefix = "node:";
|
package/dist/index.mjs
CHANGED
|
@@ -6929,6 +6929,10 @@ var ConnectionsMapSchema = z.record(z.string(), ConnectionEntrySchema);
|
|
|
6929
6929
|
|
|
6930
6930
|
// src/plugins/manifest/schemas.ts
|
|
6931
6931
|
var DEFAULT_CONFIG_PATH = ".zapierrc";
|
|
6932
|
+
var ManifestEntrySchema = z.object({
|
|
6933
|
+
implementationName: z.string().describe("Base implementation name without version (e.g., 'SlackCLIAPI')"),
|
|
6934
|
+
version: z.string().describe("Version string (e.g., '1.21.1')")
|
|
6935
|
+
});
|
|
6932
6936
|
var ActionEntrySchema = z.object({
|
|
6933
6937
|
appKey: z.string().describe("App key (slug or implementation name)"),
|
|
6934
6938
|
actionKey: z.string().describe("Action key identifier"),
|
|
@@ -6943,15 +6947,7 @@ var ActionEntrySchema = z.object({
|
|
|
6943
6947
|
createdAt: z.string().describe("ISO 8601 timestamp when created")
|
|
6944
6948
|
});
|
|
6945
6949
|
var ManifestSchema = z.object({
|
|
6946
|
-
apps: z.record(
|
|
6947
|
-
z.string(),
|
|
6948
|
-
z.object({
|
|
6949
|
-
implementationName: z.string().describe(
|
|
6950
|
-
"Base implementation name without version (e.g., 'SlackCLIAPI')"
|
|
6951
|
-
),
|
|
6952
|
-
version: z.string().describe("Version string (e.g., '1.21.1')")
|
|
6953
|
-
})
|
|
6954
|
-
).optional(),
|
|
6950
|
+
apps: z.record(z.string(), ManifestEntrySchema).optional(),
|
|
6955
6951
|
actions: z.record(z.string(), ActionEntrySchema).optional().describe("Saved action configurations with their schemas"),
|
|
6956
6952
|
canIncludeSharedConnections: z.boolean().optional().describe("Allow listing shared connections"),
|
|
6957
6953
|
canIncludeSharedTables: z.boolean().optional().describe("Allow listing shared tables"),
|
|
@@ -6977,22 +6973,91 @@ async function toArrayFromAsync(asyncIterable) {
|
|
|
6977
6973
|
}
|
|
6978
6974
|
|
|
6979
6975
|
// src/plugins/manifest/index.ts
|
|
6980
|
-
function
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6976
|
+
function parseManifestSection({
|
|
6977
|
+
section,
|
|
6978
|
+
raw,
|
|
6979
|
+
schema,
|
|
6980
|
+
source
|
|
6981
|
+
}) {
|
|
6982
|
+
if (raw == null) {
|
|
6983
|
+
return void 0;
|
|
6984
|
+
}
|
|
6985
|
+
if (typeof raw !== "object" || Array.isArray(raw)) {
|
|
6986
|
+
console.warn(`\u26A0\uFE0F Ignoring "${section}" in ${source}: expected an object`);
|
|
6987
|
+
return void 0;
|
|
6988
|
+
}
|
|
6989
|
+
const kept = {};
|
|
6990
|
+
for (const [key2, value] of Object.entries(raw)) {
|
|
6991
|
+
const result = schema.safeParse(value);
|
|
6987
6992
|
if (result.success) {
|
|
6988
|
-
|
|
6993
|
+
kept[key2] = result.data;
|
|
6994
|
+
} else {
|
|
6995
|
+
console.warn(
|
|
6996
|
+
`\u26A0\uFE0F Dropping invalid "${section}" entry "${key2}" in ${source}: ${result.error}`
|
|
6997
|
+
);
|
|
6989
6998
|
}
|
|
6990
|
-
|
|
6991
|
-
|
|
6999
|
+
}
|
|
7000
|
+
return kept;
|
|
7001
|
+
}
|
|
7002
|
+
var MANIFEST_FLAGS = [
|
|
7003
|
+
"canIncludeSharedConnections",
|
|
7004
|
+
"canIncludeSharedTables",
|
|
7005
|
+
"canDeleteTables"
|
|
7006
|
+
];
|
|
7007
|
+
function parseManifestContent(content, source) {
|
|
7008
|
+
let parsed;
|
|
7009
|
+
try {
|
|
7010
|
+
parsed = JSON.parse(content);
|
|
6992
7011
|
} catch (error) {
|
|
6993
7012
|
console.warn(`\u26A0\uFE0F Failed to parse manifest from ${source}:`, error);
|
|
6994
7013
|
return null;
|
|
6995
7014
|
}
|
|
7015
|
+
if (parsed == null || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
7016
|
+
return null;
|
|
7017
|
+
}
|
|
7018
|
+
const raw = parsed;
|
|
7019
|
+
const manifest = {};
|
|
7020
|
+
const apps = parseManifestSection({
|
|
7021
|
+
section: "apps",
|
|
7022
|
+
raw: raw.apps,
|
|
7023
|
+
schema: ManifestEntrySchema,
|
|
7024
|
+
source
|
|
7025
|
+
});
|
|
7026
|
+
if (apps) {
|
|
7027
|
+
manifest.apps = apps;
|
|
7028
|
+
}
|
|
7029
|
+
const actions = parseManifestSection({
|
|
7030
|
+
section: "actions",
|
|
7031
|
+
raw: raw.actions,
|
|
7032
|
+
schema: ActionEntrySchema,
|
|
7033
|
+
source
|
|
7034
|
+
});
|
|
7035
|
+
if (actions) {
|
|
7036
|
+
manifest.actions = actions;
|
|
7037
|
+
}
|
|
7038
|
+
const connections = parseManifestSection({
|
|
7039
|
+
section: "connections",
|
|
7040
|
+
raw: raw.connections,
|
|
7041
|
+
schema: ConnectionEntrySchema,
|
|
7042
|
+
source
|
|
7043
|
+
});
|
|
7044
|
+
if (connections) {
|
|
7045
|
+
manifest.connections = connections;
|
|
7046
|
+
}
|
|
7047
|
+
for (const flag of MANIFEST_FLAGS) {
|
|
7048
|
+
const value = raw[flag];
|
|
7049
|
+
if (value === void 0) {
|
|
7050
|
+
continue;
|
|
7051
|
+
}
|
|
7052
|
+
if (typeof value === "boolean") {
|
|
7053
|
+
manifest[flag] = value;
|
|
7054
|
+
} else {
|
|
7055
|
+
console.warn(
|
|
7056
|
+
`\u26A0\uFE0F Dropping invalid "${flag}" in ${source}: expected a boolean`
|
|
7057
|
+
);
|
|
7058
|
+
}
|
|
7059
|
+
}
|
|
7060
|
+
return manifest;
|
|
6996
7061
|
}
|
|
6997
7062
|
async function readManifestFromFile(filePath) {
|
|
6998
7063
|
try {
|
|
@@ -8750,7 +8815,7 @@ function parseDeprecationDate(value) {
|
|
|
8750
8815
|
}
|
|
8751
8816
|
|
|
8752
8817
|
// src/sdk-version.ts
|
|
8753
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.82.
|
|
8818
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.82.1" : void 0) || "unknown";
|
|
8754
8819
|
|
|
8755
8820
|
// src/utils/open-url.ts
|
|
8756
8821
|
var nodePrefix = "node:";
|