@pleaseai/ask-schema 0.1.0 → 0.2.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/dist/lock.d.ts +16 -8
- package/dist/lock.d.ts.map +1 -1
- package/dist/lock.js +12 -1
- package/dist/lock.js.map +1 -1
- package/package.json +1 -1
package/dist/lock.d.ts
CHANGED
|
@@ -28,8 +28,9 @@ export declare const LockEntrySchema: z.ZodDiscriminatedUnion<"source", [z.ZodOb
|
|
|
28
28
|
commit?: string | undefined;
|
|
29
29
|
}>, z.ZodObject<{
|
|
30
30
|
source: z.ZodLiteral<"npm">;
|
|
31
|
-
tarball: z.ZodString
|
|
31
|
+
tarball: z.ZodOptional<z.ZodString>;
|
|
32
32
|
integrity: z.ZodOptional<z.ZodString>;
|
|
33
|
+
installPath: z.ZodOptional<z.ZodString>;
|
|
33
34
|
version: z.ZodString;
|
|
34
35
|
fetchedAt: z.ZodString;
|
|
35
36
|
fileCount: z.ZodNumber;
|
|
@@ -40,16 +41,18 @@ export declare const LockEntrySchema: z.ZodDiscriminatedUnion<"source", [z.ZodOb
|
|
|
40
41
|
fetchedAt: string;
|
|
41
42
|
fileCount: number;
|
|
42
43
|
contentHash: string;
|
|
43
|
-
tarball
|
|
44
|
+
tarball?: string | undefined;
|
|
44
45
|
integrity?: string | undefined;
|
|
46
|
+
installPath?: string | undefined;
|
|
45
47
|
}, {
|
|
46
48
|
source: "npm";
|
|
47
49
|
version: string;
|
|
48
50
|
fetchedAt: string;
|
|
49
51
|
fileCount: number;
|
|
50
52
|
contentHash: string;
|
|
51
|
-
tarball
|
|
53
|
+
tarball?: string | undefined;
|
|
52
54
|
integrity?: string | undefined;
|
|
55
|
+
installPath?: string | undefined;
|
|
53
56
|
}>, z.ZodObject<{
|
|
54
57
|
source: z.ZodLiteral<"web">;
|
|
55
58
|
urls: z.ZodArray<z.ZodString, "many">;
|
|
@@ -126,8 +129,9 @@ export declare const LockSchema: z.ZodObject<{
|
|
|
126
129
|
commit?: string | undefined;
|
|
127
130
|
}>, z.ZodObject<{
|
|
128
131
|
source: z.ZodLiteral<"npm">;
|
|
129
|
-
tarball: z.ZodString
|
|
132
|
+
tarball: z.ZodOptional<z.ZodString>;
|
|
130
133
|
integrity: z.ZodOptional<z.ZodString>;
|
|
134
|
+
installPath: z.ZodOptional<z.ZodString>;
|
|
131
135
|
version: z.ZodString;
|
|
132
136
|
fetchedAt: z.ZodString;
|
|
133
137
|
fileCount: z.ZodNumber;
|
|
@@ -138,16 +142,18 @@ export declare const LockSchema: z.ZodObject<{
|
|
|
138
142
|
fetchedAt: string;
|
|
139
143
|
fileCount: number;
|
|
140
144
|
contentHash: string;
|
|
141
|
-
tarball
|
|
145
|
+
tarball?: string | undefined;
|
|
142
146
|
integrity?: string | undefined;
|
|
147
|
+
installPath?: string | undefined;
|
|
143
148
|
}, {
|
|
144
149
|
source: "npm";
|
|
145
150
|
version: string;
|
|
146
151
|
fetchedAt: string;
|
|
147
152
|
fileCount: number;
|
|
148
153
|
contentHash: string;
|
|
149
|
-
tarball
|
|
154
|
+
tarball?: string | undefined;
|
|
150
155
|
integrity?: string | undefined;
|
|
156
|
+
installPath?: string | undefined;
|
|
151
157
|
}>, z.ZodObject<{
|
|
152
158
|
source: z.ZodLiteral<"web">;
|
|
153
159
|
urls: z.ZodArray<z.ZodString, "many">;
|
|
@@ -207,8 +213,9 @@ export declare const LockSchema: z.ZodObject<{
|
|
|
207
213
|
fetchedAt: string;
|
|
208
214
|
fileCount: number;
|
|
209
215
|
contentHash: string;
|
|
210
|
-
tarball
|
|
216
|
+
tarball?: string | undefined;
|
|
211
217
|
integrity?: string | undefined;
|
|
218
|
+
installPath?: string | undefined;
|
|
212
219
|
} | {
|
|
213
220
|
source: "web";
|
|
214
221
|
version: string;
|
|
@@ -242,8 +249,9 @@ export declare const LockSchema: z.ZodObject<{
|
|
|
242
249
|
fetchedAt: string;
|
|
243
250
|
fileCount: number;
|
|
244
251
|
contentHash: string;
|
|
245
|
-
tarball
|
|
252
|
+
tarball?: string | undefined;
|
|
246
253
|
integrity?: string | undefined;
|
|
254
|
+
installPath?: string | undefined;
|
|
247
255
|
} | {
|
|
248
256
|
source: "web";
|
|
249
257
|
version: string;
|
package/dist/lock.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../src/lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../src/lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA2DvB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAK1B,CAAA;AAEF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAEvD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIrB,CAAA;AAEF,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAA"}
|
package/dist/lock.js
CHANGED
|
@@ -15,11 +15,22 @@ const GithubLockEntry = z.object({
|
|
|
15
15
|
ref: z.string(),
|
|
16
16
|
commit: z.string().regex(/^[0-9a-f]{40}$/).optional(),
|
|
17
17
|
});
|
|
18
|
+
/**
|
|
19
|
+
* `tarball` is the canonical recording when ASK fetched the package over the
|
|
20
|
+
* network. It is optional because the local-first reader (added for
|
|
21
|
+
* npm-tarball-docs-20260408) can satisfy the request from
|
|
22
|
+
* `node_modules/<pkg>/<docsPath>` without ever downloading a tarball — in
|
|
23
|
+
* that case `installPath` is recorded instead so the lock still points at a
|
|
24
|
+
* real source on disk. Callers MUST supply at least one of the two; this
|
|
25
|
+
* invariant is enforced in the CLI's lock-entry builder rather than via Zod
|
|
26
|
+
* `refine` because `discriminatedUnion` does not accept ZodEffects branches.
|
|
27
|
+
*/
|
|
18
28
|
const NpmLockEntry = z.object({
|
|
19
29
|
...LockEntryBase,
|
|
20
30
|
source: z.literal('npm'),
|
|
21
|
-
tarball: z.string().url(),
|
|
31
|
+
tarball: z.string().url().optional(),
|
|
22
32
|
integrity: z.string().regex(/^sha(?:256|384|512)-[A-Za-z0-9+/=]+$/, 'integrity must be a valid Subresource Integrity hash').optional(),
|
|
33
|
+
installPath: z.string().optional(),
|
|
23
34
|
});
|
|
24
35
|
const WebLockEntry = z.object({
|
|
25
36
|
...LockEntryBase,
|
package/dist/lock.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.js","sourceRoot":"","sources":["../src/lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;AAEtC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CACvC,uBAAuB,EACvB,2CAA2C,CAC5C,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAA;AAE9D,MAAM,aAAa,GAAG;IACpB,OAAO,EAAE,YAAY;IACrB,SAAS,EAAE,gBAAgB;IAC3B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,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