New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@prismicio/editor-support

Package Overview
Dependencies
Maintainers
24
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prismicio/editor-support - npm Package Compare versions

Comparing version 0.4.9 to 0.4.10

72

dist/Service.d.ts

@@ -52,2 +52,4 @@ import { TypeOf } from "zod";

}>>, "many">;
locale: import("zod").ZodString;
group_lang_id: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {

@@ -73,2 +75,4 @@ id: string;

})[];
locale: string;
group_lang_id: string;
}, {

@@ -94,2 +98,4 @@ id: string;

})[];
locale: string;
group_lang_id: string;
}>;

@@ -149,2 +155,4 @@ declare const documentsSearchAPISchemaOkType: import("zod").ZodObject<{

}>>, "many">;
locale: import("zod").ZodString;
group_lang_id: import("zod").ZodString;
}, "strip", import("zod").ZodTypeAny, {

@@ -170,2 +178,4 @@ id: string;

})[];
locale: string;
group_lang_id: string;
}, {

@@ -191,2 +201,4 @@ id: string;

})[];
locale: string;
group_lang_id: string;
}>, "many">;

@@ -215,2 +227,4 @@ }, "strip", import("zod").ZodTypeAny, {

})[];
locale: string;
group_lang_id: string;
}[];

@@ -240,2 +254,4 @@ cursor?: string | undefined;

})[];
locale: string;
group_lang_id: string;
}[];

@@ -247,3 +263,3 @@ cursor?: string | undefined;

export declare function searchDocuments(baseUrl: string, cursor: string, env: "dev" | "stage" | "prod", searchTerm: string, limit: number): Promise<DocumentSearchApi>;
declare type SearchParam = "tags" | "customTypes" | "status" | "term" | "language" | "group_lang_id";
declare type SearchParam = "tags" | "language" | "customTypes" | "status" | "term" | "language" | "group_lang_id";
export declare function createSearchParams(params: {

@@ -253,2 +269,56 @@ name: SearchParam;

}[]): [string, string][];
declare const language: import("zod").ZodObject<{
id: import("zod").ZodString;
name: import("zod").ZodString;
is_master: import("zod").ZodBoolean;
}, "strip", import("zod").ZodTypeAny, {
id: string;
name: string;
is_master: boolean;
}, {
id: string;
name: string;
is_master: boolean;
}>;
declare const repository: import("zod").ZodObject<{
simulator_url: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
languages: import("zod").ZodEffects<import("zod").ZodArray<import("zod").ZodObject<{
id: import("zod").ZodString;
name: import("zod").ZodString;
is_master: import("zod").ZodBoolean;
}, "strip", import("zod").ZodTypeAny, {
id: string;
name: string;
is_master: boolean;
}, {
id: string;
name: string;
is_master: boolean;
}>, "many">, {
id: string;
name: string;
is_master: boolean;
}[], {
id: string;
name: string;
is_master: boolean;
}[]>;
}, "strip", import("zod").ZodTypeAny, {
languages: {
id: string;
name: string;
is_master: boolean;
}[];
simulator_url?: string | null | undefined;
}, {
languages: {
id: string;
name: string;
is_master: boolean;
}[];
simulator_url?: string | null | undefined;
}>;
export declare type Repository = TypeOf<typeof repository>;
export declare type Language = TypeOf<typeof language>;
export declare function getRepository(baseUrl: string, env: "dev" | "stage" | "prod"): Promise<Repository>;
export {};

64

dist/Service.es.js

@@ -1,5 +0,6 @@

import { discriminatedUnion as m, object as t, literal as a, string as e, array as c, number as d } from "zod";
import { request as l, getRequestCredentials as p } from "./Http.es.js";
import { discriminatedUnion as p, object as t, literal as a, string as e, array as n, number as d, boolean as g } from "zod";
import { sort as _ } from "./Array.es.js";
import { request as c, getRequestCredentials as m } from "./Http.es.js";
import "./Type.es.js";
const h = m("status", [
const y = p("status", [
t({ status: a("unclassified") }),

@@ -12,3 +13,3 @@ t({ status: a("published") }),

version_id: e(),
tags: c(e()),
tags: n(e()),
custom_type_label: e(),

@@ -18,34 +19,51 @@ preview_summary: e().optional(),

})
), y = t({
), h = t({
id: e(),
custom_type_id: e(),
title: e(),
versions: c(h)
}), _ = t({
versions: n(y),
locale: e(),
group_lang_id: e()
}), f = t({
total: d(),
cursor: e().optional(),
results: c(y)
results: n(h)
});
function f(n, s, r, o, i) {
const u = new URLSearchParams({
limit: i.toString(),
...s && { cursor: s }
function w(s, r, o, i, u) {
const l = new URLSearchParams({
limit: u.toString(),
...r && { cursor: r }
});
return l(`${n}/documents?${u.toString()}&${o}`, {
credentials: p(r),
okType: _
return c(`${s}/documents?${l.toString()}&${i}`, {
credentials: m(o),
okType: f
});
}
function b(n) {
return n.reduce((s, r) => {
const o = r.values.map((i) => [
r.name,
i
function P(s) {
return s.reduce((r, o) => {
const i = o.values.map((u) => [
o.name,
u
]);
return s.concat(o);
return r.concat(i);
}, []);
}
const S = t({
id: e(),
name: e(),
is_master: g()
}), v = t({
simulator_url: e().url().nullish(),
languages: n(S).transform((s) => _(s, (r) => r.name))
});
function R(s, r) {
return c(s, {
credentials: m(r),
okType: v
});
}
export {
b as createSearchParams,
f as searchDocuments
P as createSearchParams,
R as getRepository,
w as searchDocuments
};
export declare function some<A>(set: Set<A>, fn: (value: A) => boolean): boolean;
export declare function filter<A>(set: Set<A>, fn: (value: A) => boolean): Set<A>;
export declare function slice<A>(set: Set<A>, start: number, end: number): Set<A>;
export declare function map<A, U>(set: Set<A>, fn: (value: A) => U): Set<U>;
export declare function first<A>(set: Set<A>): A | undefined;
export declare function union<A>(...sets: Set<A>[]): Set<A>;
export declare function add<A>(set: Set<A>, newElement: A): Set<A>;
export declare function find<A>(set: Set<A>, fn: (value: A) => boolean): A | undefined;

@@ -1,9 +0,48 @@

function t(e, r) {
for (const o of e)
if (r(o))
function f(n, e) {
for (const t of n)
if (e(t))
return !0;
return !1;
}
function c(n, e) {
const t = /* @__PURE__ */ new Set();
for (const r of n)
e(r) && t.add(r);
return t;
}
function i(n, e, t) {
const o = Array.from(n).slice(e, t);
return new Set(o);
}
function s(n, e) {
const t = /* @__PURE__ */ new Set();
for (const r of n.values())
t.add(e(r));
return t;
}
function a(n) {
const e = n.values().next();
if (!e.done)
return e.value;
}
function d(...n) {
return n.reduce((e, t) => /* @__PURE__ */ new Set([...e, ...t]), /* @__PURE__ */ new Set());
}
function l(n, e) {
return new Set(n).add(e);
}
function S(n, e) {
for (const t of n)
if (e(t))
return t;
}
export {
t as some
l as add,
c as filter,
S as find,
a as first,
s as map,
i as slice,
f as some,
d as union
};
export declare function toURL(str: string): URL | undefined;
export declare function getUrlTitle(url: URL): string;

@@ -1,2 +0,3 @@

function r(t) {
import { capitalize as e } from "./String.es.js";
function n(t) {
try {

@@ -8,4 +9,12 @@ return new URL(t);

}
function c(t) {
try {
return t.host.split(".").slice(0, -1).filter((r) => r !== "www").map(e).at(0) ?? "";
} catch {
return "";
}
}
export {
r as toURL
c as getUrlTitle,
n as toURL
};

@@ -63,3 +63,3 @@ {

},
"version": "0.4.9"
"version": "0.4.10"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc