@picked/vite-plugin-picked 0.0.1-dev.1778468342672 → 0.0.1-dev.1778730134956
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/dist/cjs/index.js +8 -8
- package/dist/esm/index.js +127 -108
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/prefetch.d.ts.map +1 -1
- package/dist/types/retry.d.ts +56 -0
- package/dist/types/retry.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -855,13 +855,13 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require
|
|
|
855
855
|
<\/script>
|
|
856
856
|
</main>
|
|
857
857
|
</body>
|
|
858
|
-
</html>`]),n,t)}function s(e){return e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`)}function c(e){return e.replaceAll(`&`,`&`).replaceAll(`"`,`"`).replaceAll(`<`,`<`).replaceAll(`>`,`>`)}var l=`picked`,u=`\x1B[0m`;function d(){let e=process.env.NO_COLOR;return e===`1`||e===`true`}function f(e){return t=>d()?t:`${e}${t}${u}`}var p=[`debug`,`info`,`warn`,`error`,`silent`],m={debug:{color:f(`\x1B[2m`),log:console.debug,enabled:!1},info:{color:f(`\x1B[36m`),log:console.log,enabled:!0},warn:{color:f(`\x1B[33m`),log:console.warn,enabled:!0},error:{color:f(`\x1B[31m`),log:console.error,enabled:!0},silent:{log:()=>{},enabled:!1}};function
|
|
858
|
+
</html>`]),n,t)}function s(e){return e.replaceAll(`&`,`&`).replaceAll(`<`,`<`).replaceAll(`>`,`>`).replaceAll(`"`,`"`)}function c(e){return e.replaceAll(`&`,`&`).replaceAll(`"`,`"`).replaceAll(`<`,`<`).replaceAll(`>`,`>`)}var l=`picked`,u=`\x1B[0m`;function d(){let e=process.env.NO_COLOR;return e===`1`||e===`true`}function f(e){return t=>d()?t:`${e}${t}${u}`}var p=[`debug`,`info`,`warn`,`error`,`silent`],m={debug:{color:f(`\x1B[2m`),log:console.debug,enabled:!1},info:{color:f(`\x1B[36m`),log:console.log,enabled:!0},warn:{color:f(`\x1B[33m`),log:console.warn,enabled:!0},error:{color:f(`\x1B[31m`),log:console.error,enabled:!0},silent:{log:()=>{},enabled:!1}};function h(e,t){return`${new Date().toLocaleTimeString()} [${t?`${l}:${t}`:l}] ${e}`}function g(e,t,n,r){if(!e.enabled)return;let i=h(t,r);e.log(e.color?e.color(i):i),n!==void 0&&e.log(n)}function _(e){let t=m[e],n=new Set;return Object.assign((e,n,r)=>{g(t,e,n,r)},{once(e,r,i){!t.enabled||n.has(e)||(n.add(e),g(t,e,r,i))}})}function ee(e){let t=p.indexOf(e);if(t===-1){g(m.error,`invalid log level: ${e}`);return}for(let[e,n]of p.entries())m[n].enabled=e>=t}var v=f(`\x1B[34m`),y=f(`\x1B[36m`);function b(){let e=[` ${v(`_`)} ${y(`_`)} _ _ _`,`${v(`(_)`)} ${y(`(_)`)} _ __(_)__| |_____ __| |`,` ${v(`_`)} ${v(`_`)} | '_ \\ / _| / / -_) _\` |`,`${v(`(_)`)} ${v(`(_)`)} | .__/_\\__|_\\_\\___\\__,_|`,` |_|
|
|
859
859
|
`];console.log(e.join(`
|
|
860
|
-
`))}var x={banner:b,debug:
|
|
861
|
-
`);return}let o=await(0,n.readFile)(a,`utf8`);
|
|
860
|
+
`))}var x={banner:b,debug:_(`debug`),info:_(`info`),warn:_(`warn`),error:_(`error`),setLevel:ee};function te(e){return(t,n,r)=>{if(t.method!==`GET`){r();return}let i=(t.url??``).split(`?`)[0];if(i!==`/`&&i!==`/index.html`){r();return}let a=e();n.setHeader(`Content-Type`,`text/html`),n.statusCode=200,n.end(a)}}var S=`.picked/`;async function C(t,i){if(i)return;let a=(0,r.join)(t,`.gitignore`);if(!(0,e.existsSync)(a)){await(0,n.writeFile)(a,`${S}
|
|
861
|
+
`);return}let o=await(0,n.readFile)(a,`utf8`);w(o)||await(0,n.appendFile)(a,`${o.length>0&&!o.endsWith(`
|
|
862
862
|
`)?`
|
|
863
|
-
`:``}${
|
|
864
|
-
`)}function
|
|
863
|
+
`:``}${S}
|
|
864
|
+
`)}function w(e){return e.split(/\r?\n/).map(e=>e.trim()).some(e=>e===S||e===`.picked`)}var T=5,E=2e3;function D(e){let t;try{t=new URL(e).hostname}catch{return!1}return t===`localhost`||t===`127.0.0.1`||t===`::1`||t===`[::1]`?!0:t===`api.picked.app`?!1:t.endsWith(`.picked.app`)}function ne(e){return new Promise(t=>{setTimeout(t,e)})}async function O(e,t){let n=null,r=null;try{n=await e()}catch(e){r=e}if(n!==null)return n;for(let i=1;i<=T;i++){let a=E*2**(i-1);t(i,T,a),await ne(a),r=null;try{n=await e()}catch(e){r=e}if(n!==null)return n}if(r!==null)throw r;return null}function k(e){return Array.isArray(e)?e:[]}var re=1;function A(e){let t=(0,r.join)(e,`.picked`);return{pickedDir:t,manifestPath:(0,r.join)(t,`manifest.json`),projectConfigPath:(0,r.join)(t,`project-config.json`),experiencesDir:(0,r.join)(t,`experiences`)}}async function j(t){if(!(0,e.existsSync)(t))return null;try{let e=await(0,n.readFile)(t,`utf8`),r=JSON.parse(e);return M(r)?r:null}catch{return null}}function M(e){return!(typeof e!=`object`||!e||!(`version`in e)||typeof e.version!=`number`||!(`projectVersionId`in e)||typeof e.projectVersionId!=`string`||!(`workspaceId`in e)||typeof e.workspaceId!=`string`||!(`experiences`in e)||!Array.isArray(e.experiences))}function N(e){let t=new Set;for(let n of k(e.steps))n.layoutContentId&&t.add(n.id);if(t.size===0)return[];let n=[];for(let r of k(e.experiences))k(r.nodes).some(e=>e.type===`step`&&t.has(e.stepId))&&n.push(r.id);return n}async function P(e){let{apiUrl:t,projectId:i,projectRoot:a,headers:o,reuseWhenUnchanged:s=!0}=e,c=A(a),l=await I(t,i,o),u=N(l);if(s){let e=await j(c.manifestPath);if(e&&e.projectVersionId===l.versionId&&e.workspaceId===l.workspaceId)return{config:l,manifest:e,experienceContentPaths:F(c,u)}}await(0,n.mkdir)(c.experiencesDir,{recursive:!0}),await(0,n.writeFile)(c.projectConfigPath,JSON.stringify(l,null,2));let d=new Date().toISOString(),f=[];for(let e of u){let a=await L(t,i,e,o);await(0,n.writeFile)((0,r.join)(c.experiencesDir,`${e}.json`),JSON.stringify(a,null,2)),f.push({id:e,fetchedAt:d})}let p={version:re,fetchedAt:d,projectVersionId:l.versionId,workspaceId:l.workspaceId,projectId:l.id,experiences:f};return await(0,n.writeFile)(c.manifestPath,JSON.stringify(p,null,2)),{config:l,manifest:p,experienceContentPaths:F(c,u)}}function F(e,t){let n={};for(let i of t)n[i]=(0,r.join)(e.experiencesDir,`${i}.json`);return n}async function I(e,n,r){let i=()=>(0,t.fetchProject)(e,n,{headers:r}),a;try{a=D(e)?await O(i,(e,t,n)=>{x.info(`project config not ready, retrying in ${(n/1e3).toString()}s (${e.toString()}/${t.toString()})`)}):await i()}catch(t){throw Error(`[picked] Build-time fetch of project config failed for "${n}" at ${e}: ${R(t)}`)}if(!a)throw Error(`[picked] Build-time fetch of project config returned no usable response for "${n}" at ${e}. Confirm the API is reachable and the project ID is correct.`);return a}async function L(e,n,r,i){let a;try{a=await(0,t.fetchExperienceContent)(e,n,r,{headers:i})}catch(t){throw Error(`[picked] Build-time fetch of content for experience "${r}" failed at ${e}: ${R(t)}`)}if(!a)throw Error(`[picked] Build-time fetch of content for experience "${r}" returned no usable response. Confirm the experience id exists and the API is reachable.`);return a}function R(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return`unknown error`}}function z(e){let{projectConfigPath:t,experienceContentPaths:n,manifestMetadata:r}=e,i=e=>JSON.stringify(e),a=Object.entries(n).map(([e,t])=>` ${JSON.stringify(e)}: () => import(${i(t)}).then((m) => m.default ?? m),`).join(`
|
|
865
865
|
`);return`import projectConfigJson from ${i(t)}
|
|
866
866
|
|
|
867
867
|
const experienceImporters = {
|
|
@@ -883,7 +883,7 @@ export async function experienceContent(experience, _options) {
|
|
|
883
883
|
}
|
|
884
884
|
|
|
885
885
|
export const manifestMetadata = ${JSON.stringify(r)}
|
|
886
|
-
`}function
|
|
886
|
+
`}function B(e){let{apiUrl:t,projectId:n}=e;return`import { fetchProject, fetchExperienceContent } from '@picked/client/plugins/dynamic-experiences'
|
|
887
887
|
|
|
888
888
|
const apiUrl = ${JSON.stringify(t)}
|
|
889
889
|
const projectId = ${JSON.stringify(n)}
|
|
@@ -902,5 +902,5 @@ export const manifestMetadata = {
|
|
|
902
902
|
projectVersionId: projectConfig?.versionId ?? null,
|
|
903
903
|
workspaceId: projectConfig?.workspaceId ?? null,
|
|
904
904
|
}
|
|
905
|
-
`}var
|
|
906
|
-
`))}function
|
|
905
|
+
`}var V=5;function H(e,t,n){if(t.length===0)return;if(t.length>V){console.log(`\n ${e}: ${t.length.toString()} loaded\n`);return}let r=n.map(e=>Math.max(e.header.length,...t.map(t=>e.value(t).length))),i=(e,t)=>e.padEnd(r[t]??e.length),a=` ${n.map((e,t)=>i(e.header,t)).join(` `)}`,o=` ${r.map(e=>`─`.repeat(e)).join(` `)}`,s=t.map(e=>` ${n.map((t,n)=>i(t.value(e),n)).join(` `)}`);console.log([``,` ${e}:`,``,a,o,...s,``].join(`
|
|
906
|
+
`))}function U(e,t){t.length!==0&&console.log(`\n ${e}: ${t.length.toString()} loaded\n`)}var W=[{header:`Name`,value:e=>e.name},{header:`ID`,value:e=>e.id},{header:`Status`,value:e=>e.enabled?`\x1B[32m enabled\x1B[0m`:`\x1B[2mdisabled\x1B[0m`},{header:`Weight`,value:e=>`${e.weight.toString()}%`.padStart(6)},{header:`Ver`,value:e=>`v${e.version.toString()}`}],G=[{header:`Name`,value:e=>e.name},{header:`Key`,value:e=>e.key},{header:`Component`,value:e=>e.componentName},{header:`Nodes`,value:e=>e.nodes.length.toString()},{header:`Targets`,value:e=>e.targets.length.toString()}],K=[{header:`Name`,value:e=>e.name},{header:`Key`,value:e=>e.key},{header:`Fields`,value:e=>(e.fieldIds?.length??0).toString()}],q=[{header:`Name`,value:e=>e.name},{header:`Key`,value:e=>e.key},{header:`Type`,value:e=>e.type},{header:`Required`,value:e=>e.required?`yes`:`no`}],J=[{header:`Name`,value:e=>e.name},{header:`Key`,value:e=>e.key}];function Y(){return`0.0.1-dev.1778730134956`}var X=`https://api.picked.app`,Z=`virtual:picked/data`,Q=`\0${Z}`;function ie(n){let r=n.apiUrl??X,i=[],a=process.cwd(),s=`serve`,c,l=!1;return{name:`picked`,config:async(o,u)=>{s=u.command,a=process.cwd(),x.banner(),r!==X&&x.warn(`using custom API URL: ${r}`);let d=(0,t.createClientHeaders)(`vite-plugin`,Y());if(u.command===`build`){if(l)return;l=!0,x.info(`prefetching project config + content for "${n.projectId}"`);let t=A(a),o=(0,e.existsSync)(t.pickedDir),s=performance.now(),u=await P({apiUrl:r,projectId:n.projectId,projectRoot:a,headers:d}),f=(performance.now()-s).toFixed(0);await C(a,o);let p=u.config;i=k(p.features),$(p,f),c=z({projectConfigPath:t.projectConfigPath,experienceContentPaths:u.experienceContentPaths,manifestMetadata:{mode:`build`,fetchedAt:u.manifest.fetchedAt,projectVersionId:u.manifest.projectVersionId,workspaceId:u.manifest.workspaceId}})}else{x.info(`fetching project config for "${n.projectId}" (dev)`);let e=performance.now(),a=()=>(0,t.fetchProject)(r,n.projectId,{headers:d}),o=D(r)?await O(a,(e,t,n)=>{x.info(`local API not ready, retrying in ${(n/1e3).toString()}s (${e.toString()}/${t.toString()})`)}):await a(),s=(performance.now()-e).toFixed(0);o?(i=k(o.features),$(o,s)):x.warn(`failed to fetch project config for "${n.projectId}" (${s}ms)`)}},resolveId(e){if(e===Z)return Q},load(e){if(e===Q)return s===`build`?c:B({apiUrl:r,projectId:n.projectId})},configureServer(e){if(n.disableLauncher)return;e.middlewares.use(te(()=>o(i)));let t=e.printUrls.bind(e);e.printUrls=()=>{let n=e.resolvedUrls?.local[0];if(n){let e=n.replace(/:(?<port>\d+)\//,(e,t)=>`:\x1b[1m${t}\x1b[22m/`);console.log(` \x1b[32m➜\x1b[0m \x1b[1mPicked\x1b[22m: \x1b[36m${e}\x1b[0m`)}t()}},generateBundle(){n.disableLauncher||this.emitFile({type:`asset`,fileName:`index.html`,source:o(i)})}}}function $(e,t){let n=k(e.features),r=k(e.experiences),i=k(e.steps),a=k(e.fields),o=k(e.conditions),s=k(e.actions),c=JSON.stringify(e).length,l=[`${n.length.toString()} features`,`${r.length.toString()} experiences`,`${i.length.toString()} steps`,`${a.length.toString()} fields`,`${o.length.toString()} conditions`,`${s.length.toString()} actions`].join(`, `);x.info(`fetched config in ${t}ms (${l})`),H(`Features`,n,W),H(`Experiences`,r,G),H(`Steps`,i,K),H(`Fields`,a,q),H(`Conditions`,o,J),U(`Actions`,s),x.debug(`config size: ${c.toString()} bytes`)}exports.picked=ie;
|
package/dist/esm/index.js
CHANGED
|
@@ -40,38 +40,38 @@ function p(e) {
|
|
|
40
40
|
}
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region src/log.ts
|
|
43
|
-
var m = "picked",
|
|
44
|
-
function
|
|
43
|
+
var m = "picked", ee = "\x1B[0m";
|
|
44
|
+
function te() {
|
|
45
45
|
let e = process.env.NO_COLOR;
|
|
46
46
|
return e === "1" || e === "true";
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return (t) =>
|
|
48
|
+
function h(e) {
|
|
49
|
+
return (t) => te() ? t : `${e}${t}${ee}`;
|
|
50
50
|
}
|
|
51
|
-
var
|
|
51
|
+
var g = [
|
|
52
52
|
"debug",
|
|
53
53
|
"info",
|
|
54
54
|
"warn",
|
|
55
55
|
"error",
|
|
56
56
|
"silent"
|
|
57
|
-
],
|
|
57
|
+
], _ = {
|
|
58
58
|
debug: {
|
|
59
|
-
color:
|
|
59
|
+
color: h("\x1B[2m"),
|
|
60
60
|
log: console.debug,
|
|
61
61
|
enabled: !1
|
|
62
62
|
},
|
|
63
63
|
info: {
|
|
64
|
-
color:
|
|
64
|
+
color: h("\x1B[36m"),
|
|
65
65
|
log: console.log,
|
|
66
66
|
enabled: !0
|
|
67
67
|
},
|
|
68
68
|
warn: {
|
|
69
|
-
color:
|
|
69
|
+
color: h("\x1B[33m"),
|
|
70
70
|
log: console.warn,
|
|
71
71
|
enabled: !0
|
|
72
72
|
},
|
|
73
73
|
error: {
|
|
74
|
-
color:
|
|
74
|
+
color: h("\x1B[31m"),
|
|
75
75
|
log: console.error,
|
|
76
76
|
enabled: !0
|
|
77
77
|
},
|
|
@@ -80,16 +80,16 @@ var _ = [
|
|
|
80
80
|
enabled: !1
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
|
-
function
|
|
83
|
+
function v(e, t) {
|
|
84
84
|
return `${(/* @__PURE__ */ new Date()).toLocaleTimeString()} [${t ? `${m}:${t}` : m}] ${e}`;
|
|
85
85
|
}
|
|
86
86
|
function y(e, t, n, r) {
|
|
87
87
|
if (!e.enabled) return;
|
|
88
|
-
let i =
|
|
88
|
+
let i = v(t, r);
|
|
89
89
|
e.log(e.color ? e.color(i) : i), n !== void 0 && e.log(n);
|
|
90
90
|
}
|
|
91
91
|
function b(e) {
|
|
92
|
-
let t =
|
|
92
|
+
let t = _[e], n = /* @__PURE__ */ new Set();
|
|
93
93
|
return Object.assign((e, n, r) => {
|
|
94
94
|
y(t, e, n, r);
|
|
95
95
|
}, { once(e, r, i) {
|
|
@@ -97,14 +97,14 @@ function b(e) {
|
|
|
97
97
|
} });
|
|
98
98
|
}
|
|
99
99
|
function x(e) {
|
|
100
|
-
let t =
|
|
100
|
+
let t = g.indexOf(e);
|
|
101
101
|
if (t === -1) {
|
|
102
|
-
y(
|
|
102
|
+
y(_.error, `invalid log level: ${e}`);
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
|
-
for (let [e, n] of
|
|
105
|
+
for (let [e, n] of g.entries()) _[n].enabled = e >= t;
|
|
106
106
|
}
|
|
107
|
-
var S =
|
|
107
|
+
var S = h("\x1B[34m"), C = h("\x1B[36m");
|
|
108
108
|
function w() {
|
|
109
109
|
let e = [
|
|
110
110
|
` ${S("_")} ${C("_")} _ _ _`,
|
|
@@ -125,7 +125,7 @@ var T = {
|
|
|
125
125
|
};
|
|
126
126
|
//#endregion
|
|
127
127
|
//#region src/middleware.ts
|
|
128
|
-
function
|
|
128
|
+
function E(e) {
|
|
129
129
|
return (t, n, r) => {
|
|
130
130
|
if (t.method !== "GET") {
|
|
131
131
|
r();
|
|
@@ -142,31 +142,69 @@ function ne(e) {
|
|
|
142
142
|
}
|
|
143
143
|
//#endregion
|
|
144
144
|
//#region src/gitignore.ts
|
|
145
|
-
var
|
|
146
|
-
async function
|
|
145
|
+
var D = ".picked/";
|
|
146
|
+
async function ne(t, n) {
|
|
147
147
|
if (n) return;
|
|
148
148
|
let r = c(t, ".gitignore");
|
|
149
149
|
if (!e(r)) {
|
|
150
|
-
await s(r, `${
|
|
150
|
+
await s(r, `${D}
|
|
151
151
|
`);
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
154
|
let a = await o(r, "utf8");
|
|
155
|
-
O(a) || await i(r, `${a.length > 0 && !a.endsWith("\n") ? "\n" : ""}${
|
|
155
|
+
O(a) || await i(r, `${a.length > 0 && !a.endsWith("\n") ? "\n" : ""}${D}
|
|
156
156
|
`);
|
|
157
157
|
}
|
|
158
158
|
function O(e) {
|
|
159
|
-
return e.split(/\r?\n/).map((e) => e.trim()).some((e) => e ===
|
|
159
|
+
return e.split(/\r?\n/).map((e) => e.trim()).some((e) => e === D || e === ".picked");
|
|
160
|
+
}
|
|
161
|
+
//#endregion
|
|
162
|
+
//#region src/retry.ts
|
|
163
|
+
var k = 5, A = 2e3;
|
|
164
|
+
function j(e) {
|
|
165
|
+
let t;
|
|
166
|
+
try {
|
|
167
|
+
t = new URL(e).hostname;
|
|
168
|
+
} catch {
|
|
169
|
+
return !1;
|
|
170
|
+
}
|
|
171
|
+
return t === "localhost" || t === "127.0.0.1" || t === "::1" || t === "[::1]" ? !0 : t === "api.picked.app" ? !1 : t.endsWith(".picked.app");
|
|
172
|
+
}
|
|
173
|
+
function re(e) {
|
|
174
|
+
return new Promise((t) => {
|
|
175
|
+
setTimeout(t, e);
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
async function M(e, t) {
|
|
179
|
+
let n = null, r = null;
|
|
180
|
+
try {
|
|
181
|
+
n = await e();
|
|
182
|
+
} catch (e) {
|
|
183
|
+
r = e;
|
|
184
|
+
}
|
|
185
|
+
if (n !== null) return n;
|
|
186
|
+
for (let i = 1; i <= k; i++) {
|
|
187
|
+
let a = A * 2 ** (i - 1);
|
|
188
|
+
t(i, k, a), await re(a), r = null;
|
|
189
|
+
try {
|
|
190
|
+
n = await e();
|
|
191
|
+
} catch (e) {
|
|
192
|
+
r = e;
|
|
193
|
+
}
|
|
194
|
+
if (n !== null) return n;
|
|
195
|
+
}
|
|
196
|
+
if (r !== null) throw r;
|
|
197
|
+
return null;
|
|
160
198
|
}
|
|
161
199
|
//#endregion
|
|
162
200
|
//#region src/util.ts
|
|
163
|
-
function
|
|
201
|
+
function N(e) {
|
|
164
202
|
return Array.isArray(e) ? e : [];
|
|
165
203
|
}
|
|
166
204
|
//#endregion
|
|
167
205
|
//#region src/prefetch.ts
|
|
168
|
-
var
|
|
169
|
-
function
|
|
206
|
+
var P = 1;
|
|
207
|
+
function F(e) {
|
|
170
208
|
let t = c(e, ".picked");
|
|
171
209
|
return {
|
|
172
210
|
pickedDir: t,
|
|
@@ -175,47 +213,47 @@ function A(e) {
|
|
|
175
213
|
experiencesDir: c(t, "experiences")
|
|
176
214
|
};
|
|
177
215
|
}
|
|
178
|
-
async function
|
|
216
|
+
async function I(t) {
|
|
179
217
|
if (!e(t)) return null;
|
|
180
218
|
try {
|
|
181
219
|
let e = await o(t, "utf8"), n = JSON.parse(e);
|
|
182
|
-
return
|
|
220
|
+
return L(n) ? n : null;
|
|
183
221
|
} catch {
|
|
184
222
|
return null;
|
|
185
223
|
}
|
|
186
224
|
}
|
|
187
|
-
function
|
|
225
|
+
function L(e) {
|
|
188
226
|
return !(typeof e != "object" || !e || !("version" in e) || typeof e.version != "number" || !("projectVersionId" in e) || typeof e.projectVersionId != "string" || !("workspaceId" in e) || typeof e.workspaceId != "string" || !("experiences" in e) || !Array.isArray(e.experiences));
|
|
189
227
|
}
|
|
190
|
-
function
|
|
228
|
+
function R(e) {
|
|
191
229
|
let t = /* @__PURE__ */ new Set();
|
|
192
|
-
for (let n of
|
|
230
|
+
for (let n of N(e.steps)) n.layoutContentId && t.add(n.id);
|
|
193
231
|
if (t.size === 0) return [];
|
|
194
232
|
let n = [];
|
|
195
|
-
for (let r of
|
|
233
|
+
for (let r of N(e.experiences)) N(r.nodes).some((e) => e.type === "step" && t.has(e.stepId)) && n.push(r.id);
|
|
196
234
|
return n;
|
|
197
235
|
}
|
|
198
|
-
async function
|
|
199
|
-
let { apiUrl: t, projectId: n, projectRoot: r, headers: i, reuseWhenUnchanged: o = !0 } = e, l =
|
|
236
|
+
async function z(e) {
|
|
237
|
+
let { apiUrl: t, projectId: n, projectRoot: r, headers: i, reuseWhenUnchanged: o = !0 } = e, l = F(r), u = await V(t, n, i), d = R(u);
|
|
200
238
|
if (o) {
|
|
201
|
-
let e = await
|
|
239
|
+
let e = await I(l.manifestPath);
|
|
202
240
|
if (e && e.projectVersionId === u.versionId && e.workspaceId === u.workspaceId) return {
|
|
203
241
|
config: u,
|
|
204
242
|
manifest: e,
|
|
205
|
-
experienceContentPaths:
|
|
243
|
+
experienceContentPaths: B(l, d)
|
|
206
244
|
};
|
|
207
245
|
}
|
|
208
246
|
await a(l.experiencesDir, { recursive: !0 }), await s(l.projectConfigPath, JSON.stringify(u, null, 2));
|
|
209
247
|
let f = (/* @__PURE__ */ new Date()).toISOString(), p = [];
|
|
210
248
|
for (let e of d) {
|
|
211
|
-
let r = await
|
|
249
|
+
let r = await H(t, n, e, i);
|
|
212
250
|
await s(c(l.experiencesDir, `${e}.json`), JSON.stringify(r, null, 2)), p.push({
|
|
213
251
|
id: e,
|
|
214
252
|
fetchedAt: f
|
|
215
253
|
});
|
|
216
254
|
}
|
|
217
255
|
let m = {
|
|
218
|
-
version:
|
|
256
|
+
version: P,
|
|
219
257
|
fetchedAt: f,
|
|
220
258
|
projectVersionId: u.versionId,
|
|
221
259
|
workspaceId: u.workspaceId,
|
|
@@ -225,35 +263,37 @@ async function M(e) {
|
|
|
225
263
|
return await s(l.manifestPath, JSON.stringify(m, null, 2)), {
|
|
226
264
|
config: u,
|
|
227
265
|
manifest: m,
|
|
228
|
-
experienceContentPaths:
|
|
266
|
+
experienceContentPaths: B(l, d)
|
|
229
267
|
};
|
|
230
268
|
}
|
|
231
|
-
function
|
|
269
|
+
function B(e, t) {
|
|
232
270
|
let n = {};
|
|
233
271
|
for (let r of t) n[r] = c(e.experiencesDir, `${r}.json`);
|
|
234
272
|
return n;
|
|
235
273
|
}
|
|
236
|
-
async function
|
|
237
|
-
let i;
|
|
274
|
+
async function V(e, t, n) {
|
|
275
|
+
let i = () => r(e, t, { headers: n }), a;
|
|
238
276
|
try {
|
|
239
|
-
|
|
277
|
+
a = j(e) ? await M(i, (e, t, n) => {
|
|
278
|
+
T.info(`project config not ready, retrying in ${(n / 1e3).toString()}s (${e.toString()}/${t.toString()})`);
|
|
279
|
+
}) : await i();
|
|
240
280
|
} catch (n) {
|
|
241
|
-
throw Error(`[picked] Build-time fetch of project config failed for "${t}" at ${e}: ${
|
|
281
|
+
throw Error(`[picked] Build-time fetch of project config failed for "${t}" at ${e}: ${U(n)}`);
|
|
242
282
|
}
|
|
243
|
-
if (!
|
|
244
|
-
return
|
|
283
|
+
if (!a) throw Error(`[picked] Build-time fetch of project config returned no usable response for "${t}" at ${e}. Confirm the API is reachable and the project ID is correct.`);
|
|
284
|
+
return a;
|
|
245
285
|
}
|
|
246
|
-
async function
|
|
286
|
+
async function H(e, t, r, i) {
|
|
247
287
|
let a;
|
|
248
288
|
try {
|
|
249
289
|
a = await n(e, t, r, { headers: i });
|
|
250
290
|
} catch (t) {
|
|
251
|
-
throw Error(`[picked] Build-time fetch of content for experience "${r}" failed at ${e}: ${
|
|
291
|
+
throw Error(`[picked] Build-time fetch of content for experience "${r}" failed at ${e}: ${U(t)}`);
|
|
252
292
|
}
|
|
253
293
|
if (!a) throw Error(`[picked] Build-time fetch of content for experience "${r}" returned no usable response. Confirm the experience id exists and the API is reachable.`);
|
|
254
294
|
return a;
|
|
255
295
|
}
|
|
256
|
-
function
|
|
296
|
+
function U(e) {
|
|
257
297
|
if (e instanceof Error) return e.message;
|
|
258
298
|
if (typeof e == "string") return e;
|
|
259
299
|
try {
|
|
@@ -264,7 +304,7 @@ function I(e) {
|
|
|
264
304
|
}
|
|
265
305
|
//#endregion
|
|
266
306
|
//#region src/virtual-module/build.ts
|
|
267
|
-
function
|
|
307
|
+
function W(e) {
|
|
268
308
|
let { projectConfigPath: t, experienceContentPaths: n, manifestMetadata: r } = e, i = (e) => JSON.stringify(e), a = Object.entries(n).map(([e, t]) => ` ${JSON.stringify(e)}: () => import(${i(t)}).then((m) => m.default ?? m),`).join("\n");
|
|
269
309
|
return `import projectConfigJson from ${i(t)}
|
|
270
310
|
|
|
@@ -291,7 +331,7 @@ export const manifestMetadata = ${JSON.stringify(r)}
|
|
|
291
331
|
}
|
|
292
332
|
//#endregion
|
|
293
333
|
//#region src/virtual-module/dev.ts
|
|
294
|
-
function
|
|
334
|
+
function G(e) {
|
|
295
335
|
let { apiUrl: t, projectId: n } = e;
|
|
296
336
|
return `import { fetchProject, fetchExperienceContent } from '@picked/client/plugins/dynamic-experiences'
|
|
297
337
|
|
|
@@ -316,10 +356,10 @@ export const manifestMetadata = {
|
|
|
316
356
|
}
|
|
317
357
|
//#endregion
|
|
318
358
|
//#region src/index.ts
|
|
319
|
-
var
|
|
320
|
-
function
|
|
359
|
+
var K = 5;
|
|
360
|
+
function q(e, t, n) {
|
|
321
361
|
if (t.length === 0) return;
|
|
322
|
-
if (t.length >
|
|
362
|
+
if (t.length > K) {
|
|
323
363
|
console.log(`\n ${e}: ${t.length.toString()} loaded\n`);
|
|
324
364
|
return;
|
|
325
365
|
}
|
|
@@ -334,10 +374,10 @@ function B(e, t, n) {
|
|
|
334
374
|
""
|
|
335
375
|
].join("\n"));
|
|
336
376
|
}
|
|
337
|
-
function
|
|
377
|
+
function J(e, t) {
|
|
338
378
|
t.length !== 0 && console.log(`\n ${e}: ${t.length.toString()} loaded\n`);
|
|
339
379
|
}
|
|
340
|
-
var
|
|
380
|
+
var Y = [
|
|
341
381
|
{
|
|
342
382
|
header: "Name",
|
|
343
383
|
value: (e) => e.name
|
|
@@ -358,7 +398,7 @@ var H = [
|
|
|
358
398
|
header: "Ver",
|
|
359
399
|
value: (e) => `v${e.version.toString()}`
|
|
360
400
|
}
|
|
361
|
-
],
|
|
401
|
+
], ie = [
|
|
362
402
|
{
|
|
363
403
|
header: "Name",
|
|
364
404
|
value: (e) => e.name
|
|
@@ -379,7 +419,7 @@ var H = [
|
|
|
379
419
|
header: "Targets",
|
|
380
420
|
value: (e) => e.targets.length.toString()
|
|
381
421
|
}
|
|
382
|
-
],
|
|
422
|
+
], ae = [
|
|
383
423
|
{
|
|
384
424
|
header: "Name",
|
|
385
425
|
value: (e) => e.name
|
|
@@ -392,7 +432,7 @@ var H = [
|
|
|
392
432
|
header: "Fields",
|
|
393
433
|
value: (e) => (e.fieldIds?.length ?? 0).toString()
|
|
394
434
|
}
|
|
395
|
-
],
|
|
435
|
+
], oe = [
|
|
396
436
|
{
|
|
397
437
|
header: "Name",
|
|
398
438
|
value: (e) => e.name
|
|
@@ -409,59 +449,36 @@ var H = [
|
|
|
409
449
|
header: "Required",
|
|
410
450
|
value: (e) => e.required ? "yes" : "no"
|
|
411
451
|
}
|
|
412
|
-
],
|
|
452
|
+
], se = [{
|
|
413
453
|
header: "Name",
|
|
414
454
|
value: (e) => e.name
|
|
415
455
|
}, {
|
|
416
456
|
header: "Key",
|
|
417
457
|
value: (e) => e.key
|
|
418
458
|
}];
|
|
419
|
-
function q(e) {
|
|
420
|
-
try {
|
|
421
|
-
let t = new URL(e).hostname;
|
|
422
|
-
return t === "localhost" || t === "127.0.0.1" || t === "::1";
|
|
423
|
-
} catch {
|
|
424
|
-
return !1;
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
function oe(e) {
|
|
428
|
-
return new Promise((t) => {
|
|
429
|
-
setTimeout(t, e);
|
|
430
|
-
});
|
|
431
|
-
}
|
|
432
|
-
async function se(e, t, n) {
|
|
433
|
-
let i = await r(e, t, { headers: n });
|
|
434
|
-
if (i || !q(e)) return i;
|
|
435
|
-
for (let i = 1; i <= Z; i++) {
|
|
436
|
-
T.info(`local API not ready, retrying in ${(Q / 1e3).toString()}s (${i.toString()}/${Z.toString()})`), await oe(Q);
|
|
437
|
-
let a = await r(e, t, { headers: n });
|
|
438
|
-
if (a) return a;
|
|
439
|
-
}
|
|
440
|
-
return null;
|
|
441
|
-
}
|
|
442
459
|
function ce() {
|
|
443
|
-
return "0.0.1-dev.
|
|
460
|
+
return "0.0.1-dev.1778730134956";
|
|
444
461
|
}
|
|
445
|
-
var
|
|
462
|
+
var X = "https://api.picked.app", Z = "virtual:picked/data", Q = `\0${Z}`;
|
|
446
463
|
function le(n) {
|
|
447
|
-
let
|
|
464
|
+
let i = n.apiUrl ?? X, a = [], o = process.cwd(), s = "serve", c, l = !1;
|
|
448
465
|
return {
|
|
449
466
|
name: "picked",
|
|
450
|
-
config: async (
|
|
451
|
-
|
|
452
|
-
let
|
|
453
|
-
if (
|
|
454
|
-
if (
|
|
455
|
-
|
|
456
|
-
let t =
|
|
457
|
-
apiUrl:
|
|
467
|
+
config: async (u, d) => {
|
|
468
|
+
s = d.command, o = process.cwd(), T.banner(), i !== X && T.warn(`using custom API URL: ${i}`);
|
|
469
|
+
let f = t("vite-plugin", ce());
|
|
470
|
+
if (d.command === "build") {
|
|
471
|
+
if (l) return;
|
|
472
|
+
l = !0, T.info(`prefetching project config + content for "${n.projectId}"`);
|
|
473
|
+
let t = F(o), r = e(t.pickedDir), s = performance.now(), u = await z({
|
|
474
|
+
apiUrl: i,
|
|
458
475
|
projectId: n.projectId,
|
|
459
|
-
projectRoot:
|
|
460
|
-
headers:
|
|
461
|
-
}),
|
|
462
|
-
await
|
|
476
|
+
projectRoot: o,
|
|
477
|
+
headers: f
|
|
478
|
+
}), d = (performance.now() - s).toFixed(0);
|
|
479
|
+
await ne(o, r);
|
|
463
480
|
let p = u.config;
|
|
464
|
-
|
|
481
|
+
a = N(p.features), $(p, d), c = W({
|
|
465
482
|
projectConfigPath: t.projectConfigPath,
|
|
466
483
|
experienceContentPaths: u.experienceContentPaths,
|
|
467
484
|
manifestMetadata: {
|
|
@@ -473,22 +490,24 @@ function le(n) {
|
|
|
473
490
|
});
|
|
474
491
|
} else {
|
|
475
492
|
T.info(`fetching project config for "${n.projectId}" (dev)`);
|
|
476
|
-
let e = performance.now(), t =
|
|
477
|
-
|
|
493
|
+
let e = performance.now(), t = () => r(i, n.projectId, { headers: f }), o = j(i) ? await M(t, (e, t, n) => {
|
|
494
|
+
T.info(`local API not ready, retrying in ${(n / 1e3).toString()}s (${e.toString()}/${t.toString()})`);
|
|
495
|
+
}) : await t(), s = (performance.now() - e).toFixed(0);
|
|
496
|
+
o ? (a = N(o.features), $(o, s)) : T.warn(`failed to fetch project config for "${n.projectId}" (${s}ms)`);
|
|
478
497
|
}
|
|
479
498
|
},
|
|
480
499
|
resolveId(e) {
|
|
481
|
-
if (e ===
|
|
500
|
+
if (e === Z) return Q;
|
|
482
501
|
},
|
|
483
502
|
load(e) {
|
|
484
|
-
if (e ===
|
|
485
|
-
apiUrl:
|
|
503
|
+
if (e === Q) return s === "build" ? c : G({
|
|
504
|
+
apiUrl: i,
|
|
486
505
|
projectId: n.projectId
|
|
487
506
|
});
|
|
488
507
|
},
|
|
489
508
|
configureServer(e) {
|
|
490
509
|
if (n.disableLauncher) return;
|
|
491
|
-
e.middlewares.use(
|
|
510
|
+
e.middlewares.use(E(() => d(a)));
|
|
492
511
|
let t = e.printUrls.bind(e);
|
|
493
512
|
e.printUrls = () => {
|
|
494
513
|
let n = e.resolvedUrls?.local[0];
|
|
@@ -503,13 +522,13 @@ function le(n) {
|
|
|
503
522
|
n.disableLauncher || this.emitFile({
|
|
504
523
|
type: "asset",
|
|
505
524
|
fileName: "index.html",
|
|
506
|
-
source: d(
|
|
525
|
+
source: d(a)
|
|
507
526
|
});
|
|
508
527
|
}
|
|
509
528
|
};
|
|
510
529
|
}
|
|
511
530
|
function $(e, t) {
|
|
512
|
-
let n =
|
|
531
|
+
let n = N(e.features), r = N(e.experiences), i = N(e.steps), a = N(e.fields), o = N(e.conditions), s = N(e.actions), c = JSON.stringify(e).length, l = [
|
|
513
532
|
`${n.length.toString()} features`,
|
|
514
533
|
`${r.length.toString()} experiences`,
|
|
515
534
|
`${i.length.toString()} steps`,
|
|
@@ -517,7 +536,7 @@ function $(e, t) {
|
|
|
517
536
|
`${o.length.toString()} conditions`,
|
|
518
537
|
`${s.length.toString()} actions`
|
|
519
538
|
].join(", ");
|
|
520
|
-
T.info(`fetched config in ${t}ms (${l})`),
|
|
539
|
+
T.info(`fetched config in ${t}ms (${l})`), q("Features", n, Y), q("Experiences", r, ie), q("Steps", i, ae), q("Fields", a, oe), q("Conditions", o, se), J("Actions", s), T.debug(`config size: ${c.toString()} bytes`);
|
|
521
540
|
}
|
|
522
541
|
//#endregion
|
|
523
542
|
export { le as picked };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAsIlC,MAAM,WAAW,mBAAmB;IAClC,6BAA6B;IAC7B,SAAS,EAAE,MAAM,CAAA;IACjB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,qFAAqF;IACrF,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CA2I3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefetch.d.ts","sourceRoot":"","sources":["../../src/prefetch.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAEV,aAAa,EACd,MAAM,4CAA4C,CAAA;
|
|
1
|
+
{"version":3,"file":"prefetch.d.ts","sourceRoot":"","sources":["../../src/prefetch.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAEV,aAAa,EACd,MAAM,4CAA4C,CAAA;AAQnD,UAAU,uBAAuB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,UAAU,cAAc;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB,EAAE,MAAM,CAAA;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,uBAAuB,EAAE,CAAA;CACvC;AAED,UAAU,aAAa;IACrB,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAA;IACjB,uDAAuD;IACvD,YAAY,EAAE,MAAM,CAAA;IACpB,6DAA6D;IAC7D,iBAAiB,EAAE,MAAM,CAAA;IACzB,sDAAsD;IACtD,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,UAAU,cAAc;IACtB,MAAM,EAAE,aAAa,CAAA;IACrB,QAAQ,EAAE,cAAc,CAAA;IACxB,+DAA+D;IAC/D,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC/C;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,CAQvE;AAsFD,UAAU,kBAAkB;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,yFAAyF;IACzF,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,uGAAuG;IACvG,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,cAAc,CAAC,CAiDtF"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file URL-driven retry helper for the build- and dev-mode project-config fetch.
|
|
3
|
+
*
|
|
4
|
+
* Retries are auto-enabled when the configured `apiUrl` points at a host where
|
|
5
|
+
* deploys can race ahead of the API: `localhost`/`127.0.0.1`/`::1` for local
|
|
6
|
+
* development, or any `*.picked.app` host EXCEPT the canonical production host
|
|
7
|
+
* `api.picked.app`. Production and external customer hosts continue to fail fast.
|
|
8
|
+
*
|
|
9
|
+
* The retry schedule is hardcoded — there is no public option. The behavior is
|
|
10
|
+
* an internal deploy-ordering workaround for the Picked monorepo and is not
|
|
11
|
+
* intended for tuning by external SDK consumers.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Whether build- and dev-mode project-config fetches against `apiUrl` should be
|
|
15
|
+
* retried with exponential backoff. True for hosts where the API may briefly
|
|
16
|
+
* be unreachable while a deploy is propagating; false for the canonical
|
|
17
|
+
* production host and every external host.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} apiUrl - The configured API base URL.
|
|
20
|
+
* @returns {boolean} `true` when retries should be attempted, `false` otherwise.
|
|
21
|
+
* @example
|
|
22
|
+
* shouldRetryUrl('http://localhost:54321') // true
|
|
23
|
+
* shouldRetryUrl('https://picked-api-git-foo.picked.app') // true
|
|
24
|
+
* shouldRetryUrl('https://api.picked.app') // false
|
|
25
|
+
*/
|
|
26
|
+
export declare function shouldRetryUrl(apiUrl: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Run `fetchFn` once. If it returns `null` OR throws, retry up to 5 times with
|
|
29
|
+
* exponential backoff (2s → 4s → 8s → 16s → 32s, ~62 s worst-case wall time).
|
|
30
|
+
*
|
|
31
|
+
* Both thrown errors AND `null` returns are eligible for retry — the SDK's
|
|
32
|
+
* `fetchProject` and `fetchExperienceContent` swallow network errors and return
|
|
33
|
+
* `null`, so retrying only on throws would do nothing useful for the typical
|
|
34
|
+
* "API not yet up" failure mode. If every attempt fails, the most recent thrown
|
|
35
|
+
* error is rethrown; if every attempt simply returned `null`, `null` is returned
|
|
36
|
+
* so the caller can produce its own diagnostic.
|
|
37
|
+
*
|
|
38
|
+
* `onRetry` is invoked once per retry, before the corresponding backoff sleep,
|
|
39
|
+
* with the 1-indexed attempt number, the total retry budget, and the upcoming
|
|
40
|
+
* delay in ms. The callback is the only place log lines are produced — callers
|
|
41
|
+
* own the phrasing and any contextual prefix.
|
|
42
|
+
*
|
|
43
|
+
* @template T - Type of the value resolved by the fetch operation.
|
|
44
|
+
* @param {() => Promise<T | null>} fetchFn - The async fetch operation to run.
|
|
45
|
+
* @param {(attempt: number, totalAttempts: number, nextDelayMs: number) => void} onRetry -
|
|
46
|
+
* Hook invoked before each backoff sleep.
|
|
47
|
+
* @returns {Promise<T | null>} The first non-null result, or `null` after all retries are exhausted.
|
|
48
|
+
* @throws {Error} The last thrown error when every attempt threw.
|
|
49
|
+
* @example
|
|
50
|
+
* const config = await withRetry(
|
|
51
|
+
* () => fetchProject(apiUrl, projectId, { headers }),
|
|
52
|
+
* (attempt, total, ms) => log.info(`retrying in ${ms}ms (${attempt}/${total})`),
|
|
53
|
+
* )
|
|
54
|
+
*/
|
|
55
|
+
export declare function withRetry<T>(fetchFn: () => Promise<T | null>, onRetry: (attempt: number, totalAttempts: number, nextDelayMs: number) => void): Promise<T | null>;
|
|
56
|
+
//# sourceMappingURL=retry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../src/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAsBtD;AAgBD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,SAAS,CAAC,CAAC,EAC/B,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,EAChC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,GAC7E,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CA+BnB"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@picked/vite-plugin-picked",
|
|
3
3
|
"description": "Vite plugin for build-time config injection",
|
|
4
|
-
"version": "0.0.1-dev.
|
|
4
|
+
"version": "0.0.1-dev.1778730134956",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@picked/client": "0.0.1-dev.
|
|
6
|
+
"@picked/client": "0.0.1-dev.1778730134956"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
9
|
"@repo/eslint-config": "workspace:*",
|