@freelog-cli/cli2 0.5.0 → 0.5.2

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/index.d.ts DELETED
@@ -1,145 +0,0 @@
1
- import { z } from "zod";
2
- //#region src/platform/bootstrap.d.ts
3
- interface PlatformEnvelope<T = unknown> {
4
- ret?: number;
5
- errCode?: number;
6
- errcode?: number;
7
- msg?: string;
8
- data?: T;
9
- }
10
- /** 配置 tools-lib2 Node adapter:环境、Cookie/Authorization 和 CLI 风格鉴权错误。 */
11
- declare function installToolsLibForNode(): void;
12
- /** 解包 { data }(与 Console `const { data } = await FServiceAPI…` 一致) */
13
- declare function unwrapData<T>(envelope: PlatformEnvelope<T> | T): T;
14
- //#endregion
15
- //#region src/platform/tool/getSHA1Hash.d.ts
16
- /**
17
- * 路径入参 → SHA-1 小写 hex;算法实现收敛到 tools-lib Node adapter。
18
- */
19
- declare function getSHA1Hash(filePath: string): Promise<string>;
20
- //#endregion
21
- //#region src/core/errors.d.ts
22
- type ExitCode = 0 | 1 | 2 | 3 | 4 | 5;
23
- declare class CliError extends Error {
24
- readonly code: ExitCode;
25
- readonly hint?: string;
26
- readonly details?: unknown;
27
- constructor(message: string, options: {
28
- code: ExitCode;
29
- hint?: string;
30
- details?: unknown;
31
- cause?: unknown;
32
- });
33
- }
34
- //#endregion
35
- //#region src/services/compat.d.ts
36
- declare const TemplateRef: z.ZodObject<{
37
- npmName: z.ZodString;
38
- version: z.ZodUnion<[z.ZodLiteral<"latest">, z.ZodEffects<z.ZodString, string, string>]>;
39
- }, "strip", z.ZodTypeAny, {
40
- npmName: string;
41
- version: string;
42
- }, {
43
- npmName: string;
44
- version: string;
45
- }>;
46
- declare const CompatSchema: z.ZodObject<{
47
- schemaVersion: z.ZodLiteral<1>;
48
- cliVersion: z.ZodString;
49
- defaultRuntime: z.ZodEnum<["0.4", "0.5"]>;
50
- runtimes: z.ZodRecord<z.ZodString, z.ZodObject<{
51
- freelogRuntimeRange: z.ZodString;
52
- templates: z.ZodRecord<z.ZodString, z.ZodObject<{
53
- npmName: z.ZodString;
54
- version: z.ZodUnion<[z.ZodLiteral<"latest">, z.ZodEffects<z.ZodString, string, string>]>;
55
- }, "strip", z.ZodTypeAny, {
56
- npmName: string;
57
- version: string;
58
- }, {
59
- npmName: string;
60
- version: string;
61
- }>>;
62
- }, "strip", z.ZodTypeAny, {
63
- freelogRuntimeRange: string;
64
- templates: Record<string, {
65
- npmName: string;
66
- version: string;
67
- }>;
68
- }, {
69
- freelogRuntimeRange: string;
70
- templates: Record<string, {
71
- npmName: string;
72
- version: string;
73
- }>;
74
- }>>;
75
- noRuntime: z.ZodOptional<z.ZodObject<{
76
- templates: z.ZodRecord<z.ZodString, z.ZodObject<{
77
- npmName: z.ZodString;
78
- version: z.ZodUnion<[z.ZodLiteral<"latest">, z.ZodEffects<z.ZodString, string, string>]>;
79
- }, "strip", z.ZodTypeAny, {
80
- npmName: string;
81
- version: string;
82
- }, {
83
- npmName: string;
84
- version: string;
85
- }>>;
86
- }, "strip", z.ZodTypeAny, {
87
- templates: Record<string, {
88
- npmName: string;
89
- version: string;
90
- }>;
91
- }, {
92
- templates: Record<string, {
93
- npmName: string;
94
- version: string;
95
- }>;
96
- }>>;
97
- }, "strip", z.ZodTypeAny, {
98
- schemaVersion: 1;
99
- cliVersion: string;
100
- defaultRuntime: "0.4" | "0.5";
101
- runtimes: Record<string, {
102
- freelogRuntimeRange: string;
103
- templates: Record<string, {
104
- npmName: string;
105
- version: string;
106
- }>;
107
- }>;
108
- noRuntime?: {
109
- templates: Record<string, {
110
- npmName: string;
111
- version: string;
112
- }>;
113
- } | undefined;
114
- }, {
115
- schemaVersion: 1;
116
- cliVersion: string;
117
- defaultRuntime: "0.4" | "0.5";
118
- runtimes: Record<string, {
119
- freelogRuntimeRange: string;
120
- templates: Record<string, {
121
- npmName: string;
122
- version: string;
123
- }>;
124
- }>;
125
- noRuntime?: {
126
- templates: Record<string, {
127
- npmName: string;
128
- version: string;
129
- }>;
130
- } | undefined;
131
- }>;
132
- type TemplateCompat = z.infer<typeof CompatSchema>;
133
- type TemplateRefInfo = z.infer<typeof TemplateRef> & {
134
- id: string;
135
- freelogRuntimeRange?: string;
136
- };
137
- declare function loadCompat(): TemplateCompat;
138
- declare function resolveTemplateRef(compat: TemplateCompat, opts: {
139
- scaffold: 'runtime' | 'package';
140
- runtime?: '0.4' | '0.5';
141
- templateId: string;
142
- }): TemplateRefInfo;
143
- //#endregion
144
- export { CliError, getSHA1Hash, installToolsLibForNode, loadCompat, resolveTemplateRef, unwrapData };
145
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/platform/bootstrap.ts","../src/platform/tool/getSHA1Hash.ts","../src/core/errors.ts","../src/services/compat.ts"],"mappings":";;UASiB,iBAAiB;EAChC;EACA;EACA;EACA;EACA,OAAO;;;iBAIO;;iBA2DA,WAAW,GAAG,UAAU,iBAAiB,KAAK,IAAI;;;;;;iBCrE5C,YAAY,mBAAmB;;;KCRzC;cAEC,iBAAiB;WACnB,MAAM;WACN;WACA;EAGP,YAAA,iBACA;IAAW,MAAM;IAAU;IAAe;IAAmB;;;;;cCG3D,aAAW,EAAA;;;;;;;;;;cAKX,cAAY,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+BN,iBAAiB,EAAE,aAAa;KAEhC,kBAAkB,EAAE,aAAa;EAC3C;EACA;;iBA+Bc,cAAc;iBAYd,mBACd,QAAQ,gBACR;EAAQ;EAAiC;EAAyB;IACjE"}
package/dist/index.js DELETED
@@ -1,2 +0,0 @@
1
- import { B as getSHA1Hash, H as CliError, a as resolveTemplateRef, o as installToolsLibForNode, r as loadCompat, s as unwrapData } from "./compat-Ba3r5ie_.js";
2
- export { CliError, getSHA1Hash, installToolsLibForNode, loadCompat, resolveTemplateRef, unwrapData };